aboutsummaryrefslogtreecommitdiff
path: root/2021/01/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '2021/01/Makefile')
-rw-r--r--2021/01/Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/2021/01/Makefile b/2021/01/Makefile
index 9f0c9fb..d6b3c62 100644
--- a/2021/01/Makefile
+++ b/2021/01/Makefile
@@ -1,8 +1,10 @@
all:
- sed '/# START PART 2/,/# END PART 2/d' puzzles.py >puzzle-1.py
- sed '/# START PART 1/,/# END PART 1/d' puzzles.py >puzzle-2.py
- chmod +x puzzle-[12].py
+ for ext in py sh; do \
+ m4 -D DELTA=1 puzzles.$$ext >puzzle-1.$$ext; \
+ m4 -D DELTA=3 puzzles.$$ext >puzzle-2.$$ext; \
+ done
+ chmod +x puzzle-[12].{py,sh}
.PHONY: clean
clean:
- rm -f puzzle-[12].py
+ rm -f puzzle-[12].{py,sh}