1 # enforce that all scripts have a --help and --version option
2 AUTOMAKE_OPTIONS = std-options
20 pacman-db-upgrade.sh.in \
22 pacman-optimize.sh.in \
29 library/output_format.sh \
30 library/parse_options.sh
32 # Files that should be removed, but which Automake does not know.
33 MOSTLYCLEANFILES = $(bin_SCRIPTS)
36 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
37 REAL_PACKAGE_VERSION = $(GIT_VERSION)
39 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
42 #### Taken from the autoconf scripts Makefile.am ####
44 -e 's|@localedir[@]|$(localedir)|g' \
45 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
46 -e 's|@localstatedir[@]|$(localstatedir)|g' \
47 -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
48 -e 's|@prefix[@]|$(prefix)|g' \
49 -e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
50 -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
51 -e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
52 -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
53 -e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
54 -e 's|@SIZECMD[@]|$(SIZECMD)|g' \
55 -e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
56 -e 's|@DUPATH[@]|$(DUPATH)|g' \
57 -e 's|@SCRIPTNAME[@]|$@|g' \
58 -e 's|@configure_input[@]|Generated from $@.sh.in; do not edit by hand.|g'
60 ## All the scripts depend on Makefile so that they are rebuilt when the
61 ## prefix etc. changes. Use chmod -w to prevent people from editing the
62 ## wrong file by accident.
63 $(OURSCRIPTS): Makefile
65 $(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
66 $(AM_V_at)chmod +x,a-w $@
69 $(srcdir)/makepkg.sh.in \
70 $(srcdir)/library/parse_options.sh
73 $(srcdir)/pacman-db-upgrade.sh.in \
74 $(srcdir)/library/output_format.sh
77 $(srcdir)/pacman-key.sh.in \
78 $(srcdir)/library/output_format.sh \
79 $(srcdir)/library/parse_options.sh
82 $(srcdir)/pacman-optimize.sh.in \
83 $(srcdir)/library/output_format.sh
86 $(srcdir)/pkgdelta.sh.in \
87 $(srcdir)/library/output_format.sh
89 rankmirrors: $(srcdir)/rankmirrors.sh.in
92 $(srcdir)/repo-add.sh.in \
93 $(srcdir)/library/output_format.sh
95 repo-remove: $(srcdir)/repo-add.sh.in
97 $(LN_S) repo-add repo-remove
99 repo-elephant: $(srcdir)/repo-add.sh.in
101 $(LN_S) repo-add repo-elephant
104 cd $(DESTDIR)$(bindir) && \
105 $(RM) repo-elephant && \
106 ( $(LN_S) repo-add repo-elephant || \
107 ln repo-add repo-elephant || \
108 cp repo-add repo-elephant )
109 cd $(DESTDIR)$(bindir) && \
110 $(RM) repo-remove && \
111 ( $(LN_S) repo-add repo-remove || \
112 ln repo-add repo-remove || \
113 cp repo-add repo-remove )
116 cd $(DESTDIR)$(bindir) && \
117 $(RM) repo-remove repo-elephant
119 # vim:set ts=2 sw=2 noet: