2007-05-29 16:53:15 -04:00
|
|
|
# enforce that all scripts have a --help and --version option
|
|
|
|
AUTOMAKE_OPTIONS = std-options
|
2007-02-22 04:36:02 +00:00
|
|
|
|
2011-06-23 21:21:51 -05:00
|
|
|
SUBDIRS = po
|
|
|
|
|
2007-02-22 04:36:02 +00:00
|
|
|
bin_SCRIPTS = \
|
2008-06-14 11:29:29 -05:00
|
|
|
$(OURSCRIPTS) \
|
2011-06-24 15:19:36 -04:00
|
|
|
repo-remove \
|
|
|
|
repo-elephant
|
2008-06-14 11:29:29 -05:00
|
|
|
|
|
|
|
OURSCRIPTS = \
|
2007-02-22 04:36:02 +00:00
|
|
|
makepkg \
|
2010-12-08 22:16:37 +10:00
|
|
|
pacman-db-upgrade \
|
2010-09-16 00:40:35 -03:00
|
|
|
pacman-key \
|
2007-02-22 04:36:02 +00:00
|
|
|
pacman-optimize \
|
2009-02-25 19:26:31 +01:00
|
|
|
pkgdelta \
|
2007-02-22 04:36:02 +00:00
|
|
|
rankmirrors \
|
2008-06-14 11:29:29 -05:00
|
|
|
repo-add
|
2007-02-22 04:36:02 +00:00
|
|
|
|
2007-05-30 11:04:49 -04:00
|
|
|
EXTRA_DIST = \
|
2007-07-06 18:43:24 -04:00
|
|
|
makepkg.sh.in \
|
2010-12-08 22:16:37 +10:00
|
|
|
pacman-db-upgrade.sh.in \
|
2010-09-16 00:40:35 -03:00
|
|
|
pacman-key.sh.in \
|
2007-07-06 18:43:24 -04:00
|
|
|
pacman-optimize.sh.in \
|
2009-02-25 19:26:31 +01:00
|
|
|
pkgdelta.sh.in \
|
2009-08-09 20:27:40 +02:00
|
|
|
rankmirrors.sh.in \
|
2011-06-08 23:36:46 +10:00
|
|
|
repo-add.sh.in \
|
|
|
|
$(LIBRARY)
|
|
|
|
|
|
|
|
LIBRARY = \
|
2011-06-09 20:43:25 +10:00
|
|
|
library/output_format.sh \
|
2011-06-08 23:36:46 +10:00
|
|
|
library/parse_options.sh
|
2007-05-30 11:04:49 -04:00
|
|
|
|
|
|
|
# Files that should be removed, but which Automake does not know.
|
2011-06-15 13:52:56 +10:00
|
|
|
MOSTLYCLEANFILES = $(bin_SCRIPTS)
|
2007-05-30 11:04:49 -04:00
|
|
|
|
2008-05-31 11:53:51 -05:00
|
|
|
if USE_GIT_VERSION
|
2011-01-22 15:15:16 +01:00
|
|
|
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
2008-05-31 11:53:51 -05:00
|
|
|
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
|
|
|
else
|
|
|
|
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
|
|
|
endif
|
|
|
|
|
2007-05-30 11:04:49 -04:00
|
|
|
#### 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' \
|
2011-06-30 17:07:54 +02:00
|
|
|
-e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
|
2008-05-31 11:53:51 -05:00
|
|
|
-e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
|
2007-06-04 22:28:23 +01:00
|
|
|
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
2007-06-04 22:49:09 +01:00
|
|
|
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
|
2008-12-27 16:35:06 +10:00
|
|
|
-e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
|
2008-08-19 23:29:56 -05:00
|
|
|
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
|
2009-04-26 20:58:04 +10:00
|
|
|
-e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
|
2010-06-30 13:29:26 +10:00
|
|
|
-e 's|@DUPATH[@]|$(DUPATH)|g' \
|
2011-06-08 23:36:46 +10:00
|
|
|
-e 's|@SCRIPTNAME[@]|$@|g' \
|
2011-06-08 17:36:03 +10:00
|
|
|
-e 's|@configure_input[@]|Generated from $@.sh.in; do not edit by hand.|g'
|
2007-05-30 11:04:49 -04:00
|
|
|
|
|
|
|
## 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
|
2008-06-14 11:29:29 -05:00
|
|
|
$(OURSCRIPTS): Makefile
|
2008-08-23 18:27:01 -05:00
|
|
|
@echo ' ' GEN $@;
|
2011-06-15 13:52:56 +10:00
|
|
|
@rm -f $@
|
|
|
|
@test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
|
|
|
@chmod +x $@
|
|
|
|
@chmod a-w $@
|
2007-05-30 11:04:49 -04:00
|
|
|
|
2011-06-09 20:43:25 +10:00
|
|
|
makepkg: \
|
|
|
|
$(srcdir)/makepkg.sh.in \
|
|
|
|
$(srcdir)/library/parse_options.sh
|
|
|
|
|
|
|
|
pacman-db-upgrade: \
|
|
|
|
$(srcdir)/pacman-db-upgrade.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
|
|
|
|
|
|
|
pacman-key: \
|
|
|
|
$(srcdir)/pacman-key.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
|
|
|
|
2011-06-27 13:29:13 -05:00
|
|
|
pacman-optimize: \
|
|
|
|
$(srcdir)/pacman-optimize.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
2011-06-09 20:43:25 +10:00
|
|
|
|
|
|
|
pkgdelta: \
|
|
|
|
$(srcdir)/pkgdelta.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
|
|
|
|
2009-08-09 20:27:40 +02:00
|
|
|
rankmirrors: $(srcdir)/rankmirrors.sh.in
|
2011-06-09 20:43:25 +10:00
|
|
|
|
|
|
|
repo-add: \
|
|
|
|
$(srcdir)/repo-add.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
|
|
|
|
2008-06-14 11:29:29 -05:00
|
|
|
repo-remove: $(srcdir)/repo-add.sh.in
|
2009-01-02 22:23:59 -06:00
|
|
|
rm -f repo-remove
|
|
|
|
$(LN_S) repo-add repo-remove
|
2007-06-04 22:49:09 +01:00
|
|
|
|
2011-06-24 15:19:36 -04:00
|
|
|
repo-elephant: $(srcdir)/repo-add.sh.in
|
|
|
|
rm -f repo-elephant
|
|
|
|
$(LN_S) repo-add repo-elephant
|
|
|
|
|
2007-06-04 22:49:09 +01:00
|
|
|
# vim:set ts=2 sw=2 noet:
|