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 \
28 library/output_format.sh \
29 library/parse_options.sh
31 # Files that should be removed, but which Automake does not know.
32 MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
35 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
36 REAL_PACKAGE_VERSION = $(GIT_VERSION)
38 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
41 #### Taken from the autoconf scripts Makefile.am ####
43 -e 's|@localedir[@]|$(localedir)|g' \
44 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
45 -e 's|@localstatedir[@]|$(localstatedir)|g' \
46 -e 's|@prefix[@]|$(prefix)|g' \
47 -e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g' \
48 -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
49 -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
50 -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
51 -e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
52 -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
53 -e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
54 -e 's|@DUPATH[@]|$(DUPATH)|g' \
55 -e 's|@SCRIPTNAME[@]|$@|g' \
56 -e 's|@configure_input[@]|Generated from $@.sh.in; do not edit by hand.|g'
58 ## All the scripts depend on Makefile so that they are rebuilt when the
59 ## prefix etc. changes. Use chmod -w to prevent people from editing the
60 ## wrong file by accident.
61 # two 'test' lines- make sure we can handle both sh and py type scripts
62 # third 'test' line- make sure one of the two checks succeeded
63 $(OURSCRIPTS): Makefile
66 @test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@.tmp || true
67 @test -f $(srcdir)/$@.py.in && m4 -P -I $(srcdir) $(srcdir)/$@.py.in | $(edit) >$@.tmp || true
68 @test -f $@.tmp || false
74 $(srcdir)/makepkg.sh.in \
75 $(srcdir)/library/parse_options.sh
78 $(srcdir)/pacman-db-upgrade.sh.in \
79 $(srcdir)/library/output_format.sh
82 $(srcdir)/pacman-key.sh.in \
83 $(srcdir)/library/output_format.sh
85 pacman-optimize: $(srcdir)/pacman-optimize.sh.in
88 $(srcdir)/pkgdelta.sh.in \
89 $(srcdir)/library/output_format.sh
91 rankmirrors: $(srcdir)/rankmirrors.sh.in
94 $(srcdir)/repo-add.sh.in \
95 $(srcdir)/library/output_format.sh
97 repo-remove: $(srcdir)/repo-add.sh.in
99 $(LN_S) repo-add repo-remove
101 # vim:set ts=2 sw=2 noet: