Makefile: use automatic variables in the rule body
authorAntonio Ospite <ao2@ao2.it>
Tue, 20 Jun 2017 16:46:39 +0000 (18:46 +0200)
committerAntonio Ospite <ao2@ao2.it>
Tue, 20 Jun 2017 16:46:39 +0000 (18:46 +0200)
Makefile

index 710870f..0034aab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 bindir ?= $(PWD)
 
-all:
-       sed -e 's#@bindir@#$(bindir)#g' open_wrapper.sh.in > open_wrapper.sh \
-         && chmod +x open_wrapper.sh
+open_wrapper.sh: open_wrapper.sh.in
+       sed -e 's#@bindir@#$(bindir)#g' $< > $@ \
+         && chmod +x $@
 
 clean:
        rm -f open_wrapper.sh