1 # enforce that all scripts have a --help and --version option
2 AUTOMAKE_OPTIONS = std-options
22 pacman-db-upgrade.sh.in \
24 pacman-optimize.sh.in \
31 library/output_format.sh \
32 library/parse_options.sh
34 # Files that should be removed, but which Automake does not know.
35 MOSTLYCLEANFILES = $(bin_SCRIPTS)
38 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
39 REAL_PACKAGE_VERSION = $(GIT_VERSION)
41 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
44 #### Taken from the autoconf scripts Makefile.am ####
46 -e 's|@localedir[@]|$(localedir)|g' \
47 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
48 -e 's|@localstatedir[@]|$(localstatedir)|g' \
49 -e 's|@prefix[@]|$(prefix)|g' \
50 -e 's|@BASH_SHELL[@]|$(BASH_SHELL)|g' \
51 -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
52 -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
53 -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
54 -e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
55 -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
56 -e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
57 -e 's|@DUPATH[@]|$(DUPATH)|g' \
58 -e 's|@SCRIPTNAME[@]|$@|g' \
59 -e 's|@configure_input[@]|Generated from $@.sh.in; do not edit by hand.|g'
61 ## All the scripts depend on Makefile so that they are rebuilt when the
62 ## prefix etc. changes. Use chmod -w to prevent people from editing the
63 ## wrong file by accident.
64 # two 'test' lines- make sure we can handle both sh and py type scripts
65 # third 'test' line- make sure one of the two checks succeeded
66 $(OURSCRIPTS): Makefile
69 @test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
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
86 $(srcdir)/pacman-optimize.sh.in \
87 $(srcdir)/library/output_format.sh
90 $(srcdir)/pkgdelta.sh.in \
91 $(srcdir)/library/output_format.sh
93 rankmirrors: $(srcdir)/rankmirrors.sh.in
96 $(srcdir)/repo-add.sh.in \
97 $(srcdir)/library/output_format.sh
99 repo-remove: $(srcdir)/repo-add.sh.in
101 $(LN_S) repo-add repo-remove
103 repo-elephant: $(srcdir)/repo-add.sh.in
105 $(LN_S) repo-add repo-elephant
107 # vim:set ts=2 sw=2 noet: