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