2007-05-29 16:53:15 -04:00
|
|
|
# enforce that all scripts have a --help and --version option
|
|
|
|
AUTOMAKE_OPTIONS = std-options
|
2007-02-21 23:36:02 -05:00
|
|
|
|
|
|
|
bin_SCRIPTS = \
|
|
|
|
gensync \
|
|
|
|
makepkg \
|
|
|
|
makeworld \
|
|
|
|
pacman-optimize \
|
|
|
|
rankmirrors \
|
|
|
|
repo-add \
|
|
|
|
repo-remove \
|
|
|
|
updatesync
|
|
|
|
|
2007-05-30 11:04:49 -04:00
|
|
|
EXTRA_DIST = \
|
2007-07-06 18:43:24 -04:00
|
|
|
gensync.sh.in \
|
|
|
|
makepkg.sh.in \
|
|
|
|
makeworld.sh.in \
|
|
|
|
pacman-optimize.sh.in \
|
|
|
|
rankmirrors.py.in \
|
|
|
|
repo-add.sh.in \
|
|
|
|
repo-remove.sh.in \
|
|
|
|
updatesync.sh.in
|
2007-05-30 11:04:49 -04:00
|
|
|
|
|
|
|
# Files that should be removed, but which Automake does not know.
|
|
|
|
MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
|
|
|
|
|
|
|
|
#### Taken from the autoconf scripts Makefile.am ####
|
|
|
|
edit = sed \
|
|
|
|
-e 's|@localedir[@]|$(localedir)|g' \
|
|
|
|
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
|
2007-06-04 17:35:31 -04:00
|
|
|
-e 's|@localstatedir[@]|$(localstatedir)|g' \
|
2007-05-30 11:04:49 -04:00
|
|
|
-e 's|@prefix[@]|$(prefix)|g' \
|
|
|
|
-e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
|
2007-06-04 17:28:23 -04:00
|
|
|
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
2007-06-04 17:49:09 -04:00
|
|
|
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
|
2008-01-05 23:00:21 -05:00
|
|
|
-e 's|@DBEXT[@]|$(DBEXT)|g' \
|
2007-05-30 11:04:49 -04:00
|
|
|
-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
|
|
|
|
|
|
|
|
## All the scripts depend on Makefile so that they are rebuilt when the
|
|
|
|
## prefix etc. changes. Use chmod -w to prevent people from editing the
|
|
|
|
## wrong file by accident.
|
2007-07-06 18:43:24 -04:00
|
|
|
# two 'test' lines- make sure we can handle both sh and py type scripts
|
|
|
|
# third 'test' line- make sure one of the two checks succeeded
|
2007-05-30 11:04:49 -04:00
|
|
|
$(bin_SCRIPTS): Makefile
|
|
|
|
rm -f $@ $@.tmp
|
2007-07-06 18:43:24 -04:00
|
|
|
test -f $(srcdir)/$@.sh.in && $(edit) $(srcdir)/$@.sh.in >$@.tmp || true
|
|
|
|
test -f $(srcdir)/$@.py.in && $(edit) $(srcdir)/$@.py.in >$@.tmp || true
|
|
|
|
test -f $@.tmp || false
|
2007-05-30 11:04:49 -04:00
|
|
|
chmod +x $@.tmp
|
|
|
|
chmod a-w $@.tmp
|
|
|
|
mv $@.tmp $@
|
|
|
|
|
2007-07-06 18:43:24 -04:00
|
|
|
gensync: $(srcdir)/gensync.sh.in
|
|
|
|
makepkg: $(srcdir)/makepkg.sh.in
|
|
|
|
makeworld: $(srcdir)/makeworld.sh.in
|
|
|
|
pacman-optimize: $(srcdir)/pacman-optimize.sh.in
|
|
|
|
rankmirrors: $(srcdir)/rankmirrors.py.in
|
|
|
|
repo-add: $(srcdir)/repo-add.sh.in
|
|
|
|
repo-remove: $(srcdir)/repo-remove.sh.in
|
|
|
|
re-pacman: $(srcdir)/re-pacman.sh.in
|
|
|
|
updatesync: $(srcdir)/updatesync.sh.in
|
2007-06-04 17:49:09 -04:00
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 noet:
|