1 # enforce that all scripts have a --help and --version option
2 AUTOMAKE_OPTIONS = std-options
19 pacman-db-upgrade.sh.in \
21 pacman-optimize.sh.in \
26 # Files that should be removed, but which Automake does not know.
27 MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
30 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
31 REAL_PACKAGE_VERSION = $(GIT_VERSION)
33 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
36 #### Taken from the autoconf scripts Makefile.am ####
38 -e 's|@localedir[@]|$(localedir)|g' \
39 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
40 -e 's|@localstatedir[@]|$(localstatedir)|g' \
41 -e 's|@prefix[@]|$(prefix)|g' \
42 -e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g' \
43 -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
44 -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
45 -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
46 -e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
47 -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
48 -e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
49 -e 's|@DUPATH[@]|$(DUPATH)|g' \
50 -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
52 ## All the scripts depend on Makefile so that they are rebuilt when the
53 ## prefix etc. changes. Use chmod -w to prevent people from editing the
54 ## wrong file by accident.
55 # two 'test' lines- make sure we can handle both sh and py type scripts
56 # third 'test' line- make sure one of the two checks succeeded
57 $(OURSCRIPTS): Makefile
60 @test -f $(srcdir)/$@.sh.in && $(edit) $(srcdir)/$@.sh.in >$@.tmp || true
61 @test -f $(srcdir)/$@.py.in && $(edit) $(srcdir)/$@.py.in >$@.tmp || true
62 @test -f $@.tmp || false
67 makepkg: $(srcdir)/makepkg.sh.in
68 pacman-db-upgrade: $(srcdir)/pacman-db-upgrade.sh.in
69 pacman-key: ${srcdir}/pacman-key.sh.in
70 pacman-optimize: $(srcdir)/pacman-optimize.sh.in
71 pkgdelta: $(srcdir)/pkgdelta.sh.in
72 rankmirrors: $(srcdir)/rankmirrors.sh.in
73 repo-add: $(srcdir)/repo-add.sh.in
74 repo-remove: $(srcdir)/repo-add.sh.in
76 $(LN_S) repo-add repo-remove
78 # vim:set ts=2 sw=2 noet: