diff --git a/Makefile b/Makefile
index 1371e79df271e25845bd0dd0e9993a10b69119ff..9b9be592ae4e7b54762708918adcca5f30395ec6 100644 (file)
--- a/Makefile
+++ b/Makefile
chmod +x $@+
mv $@+ $@
-$(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl
+$(patsubst %.perl,%,$(SCRIPT_PERL)): perl/Makefile
+$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
rm -f $@ $@+
- sed -e '1s|#!.*perl\(.*\)|#!$(PERL_PATH_SQ)\1 -I'"$$(make -s -C perl instlibdir)"'|' \
+ INSTLIBDIR=$$(make -s -C perl instlibdir) && \
+ sed -e '1s|#!.*perl\(.*\)|#!$(PERL_PATH_SQ)\1|' \
+ -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
$@.perl >$@+
chmod +x $@+