summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r--scripts/Makefile.am12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 5502cfd..fc0b83b 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -4,10 +4,16 @@ dist_bin_SCRIPTS = \
calcurse-upgrade
EXTRA_DIST = \
- calcurse-upgrade.sh
+ calcurse-upgrade.sh.in
CLEANFILES = \
calcurse-upgrade
-calcurse-upgrade: calcurse-upgrade.sh
- $(AM_V_GEN) $(INSTALL) $< $@
+edit = sed \
+ -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g'
+
+calcurse-upgrade: calcurse-upgrade.sh.in
+ $(AM_V_at)$(RM) "$@"
+ $(AM_V_GEN)$(edit) <"$(srcdir)/$<" >"$@"
+ $(AM_V_at)chmod +x "$@"
+ $(AM_V_at)chmod a-w "$@"