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/parseopts.sh \
31 library/parse_options.sh
33 # Files that should be removed, but which Automake does not know.
34 MOSTLYCLEANFILES = $(bin_SCRIPTS)
37 GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
38 REAL_PACKAGE_VERSION = $(GIT_VERSION)
40 REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
43 #### Taken from the autoconf scripts Makefile.am ####
45 -e 's|@localedir[@]|$(localedir)|g' \
46 -e 's|@sysconfdir[@]|$(sysconfdir)|g' \
47 -e 's|@localstatedir[@]|$(localstatedir)|g' \
48 -e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
49 -e 's|@prefix[@]|$(prefix)|g' \
50 -e '1s|!/bin/bash|!$(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 $(OURSCRIPTS): Makefile
66 $(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
67 $(AM_V_at)chmod +x,a-w $@
70 $(srcdir)/makepkg.sh.in \
71 $(srcdir)/library/parse_options.sh
74 $(srcdir)/pacman-db-upgrade.sh.in \
75 $(srcdir)/library/output_format.sh
78 $(srcdir)/pacman-key.sh.in \
79 $(srcdir)/library/output_format.sh \
80 $(srcdir)/library/parse_options.sh
83 $(srcdir)/pacman-optimize.sh.in \
84 $(srcdir)/library/output_format.sh
87 $(srcdir)/pkgdelta.sh.in \
88 $(srcdir)/library/output_format.sh
90 rankmirrors: $(srcdir)/rankmirrors.sh.in
93 $(srcdir)/repo-add.sh.in \
94 $(srcdir)/library/output_format.sh
96 repo-remove: $(srcdir)/repo-add.sh.in
98 $(LN_S) repo-add repo-remove
100 repo-elephant: $(srcdir)/repo-add.sh.in
102 $(LN_S) repo-add repo-elephant
105 cd $(DESTDIR)$(bindir) && \
106 $(RM) repo-elephant && \
107 ( $(LN_S) repo-add repo-elephant || \
108 ln repo-add repo-elephant || \
109 cp repo-add repo-elephant )
110 cd $(DESTDIR)$(bindir) && \
111 $(RM) repo-remove && \
112 ( $(LN_S) repo-add repo-remove || \
113 ln repo-add repo-remove || \
114 cp repo-add repo-remove )
117 cd $(DESTDIR)$(bindir) && \
118 $(RM) repo-remove repo-elephant
120 # vim:set ts=2 sw=2 noet: