aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-07-25 17:03:59 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-07-25 17:59:14 +0200
commit29e624aaa14b98a45f0408e0b1925b60136871d3 (patch)
treed3e6be48e015d4cc13c8d33be958f1cadd899276 /Makefile
parentb09789958501538373b1f1cbad6112fdc1d149d4 (diff)
downloadtrygvisio_soil_moisture-29e624aaa14b98a45f0408e0b1925b60136871d3.tar.gz
trygvisio_soil_moisture-29e624aaa14b98a45f0408e0b1925b60136871d3.tar.bz2
trygvisio_soil_moisture-29e624aaa14b98a45f0408e0b1925b60136871d3.tar.xz
trygvisio_soil_moisture-29e624aaa14b98a45f0408e0b1925b60136871d3.zip
o Adding a Make target to fix files after the Arduino IDE appends some blank lines.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3f4c604..9445351 100644
--- a/Makefile
+++ b/Makefile
@@ -16,3 +16,9 @@ ARDMK_DIR ?= /usr/share/arduino
$(ARDMK_DIR)/Arduino.mk:
@if [ ! -r $(ARDMK_DIR)/Arduino.mk ]; then echo "You need to install the arduino-mk package"; fi
@false
+
+fix-lines:
+ @for f in `ls -1 *.cpp *.h *.ino`; do \
+ sed -e :a -e '/^\n*$$/{$$d;N;ba' -e '}' $$f > x; \
+ mv x $$f; \
+ done