Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2013-09-22 11:25:29 +0100
committerAllan McRae <allan@archlinux.org>2013-10-14 13:01:03 +1000
commitc9ab8a7f6c4d70672e2681f0e57d3298a2bdab7b (patch)
treec82d07bc26e2c5884ec280f2d58e541fbc95069b /scripts/Makefile.am
parent0308df07d3209770e5f1c37d765a79c44d731e68 (diff)
makepkg: run locally with libtool style wrapper
Build makepkg to scripts/.lib/makepkg and add a wrapper script to call it. This is not useful at the moment, but is the first step to allowing makepkg to be split into smaller pieces. Signed-off-by: Allan McRae <allan@archlinux.org> [Ashley: rebased] Signed-off-by: Ashley Whetter <ashley@awhetter.co.uk>
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r--scripts/Makefile.am25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 1f3bae24..f45065da 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = po
bin_SCRIPTS = \
$(OURSCRIPTS) \
makepkg-template \
+ makepkg-wrapper \
repo-remove \
repo-elephant
@@ -20,6 +21,7 @@ OURSCRIPTS = \
EXTRA_DIST = \
makepkg.sh.in \
makepkg-template.pl.in \
+ makepkg-wrapper.sh.in \
pacman-db-upgrade.sh.in \
pacman-key.sh.in \
pacman-optimize.sh.in \
@@ -37,6 +39,9 @@ LIBRARY = \
# Files that should be removed, but which Automake does not know.
MOSTLYCLEANFILES = $(bin_SCRIPTS)
+clean-local:
+ $(AM_V_at)$(RM) -r .lib
+
if USE_GIT_VERSION
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
REAL_PACKAGE_VERSION = $(GIT_VERSION)
@@ -77,6 +82,7 @@ $(OURSCRIPTS): Makefile
makepkg: \
$(srcdir)/makepkg.sh.in \
+ $(srcdir)/makepkg-wrapper.sh.in \
$(srcdir)/library/parseopts.sh
makepkg-template: \
@@ -117,8 +123,27 @@ repo-elephant: $(srcdir)/repo-add.sh.in
$(AM_V_at)$(RM) repo-elephant
$(AM_V_at)$(LN_S) repo-add repo-elephant
+makepkg-wrapper: \
+ Makefile \
+ $(srcdir)/makepkg-wrapper.sh.in \
+ $(srcdir)/makepkg.sh.in \
+ $(srcdir)/library/parseopts.sh \
+ | makepkg
+ $(AM_V_at)$(MKDIR_P) .lib
+ $(AM_V_at)mv -f makepkg .lib
+ $(AM_V_at)$(RM) $@
+ $(AM_V_GEN)sed \
+ -e "s|@PWD[@]|$$(pwd)|" \
+ -e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
+ $(srcdir)/$@.sh.in > $@
+ $(AM_V_at)chmod +x,a-w $@
+ $(AM_V_at)$(LN_S) makepkg-wrapper makepkg
+
install-data-hook:
cd $(DESTDIR)$(bindir) && \
+ $(RM) makepkg makepkg-wrapper
+ $(INSTALL) .lib/makepkg $(DESTDIR)$(bindir)/makepkg
+ cd $(DESTDIR)$(bindir) && \
$(RM) repo-elephant && \
( $(LN_S) repo-add repo-elephant || \
ln repo-add repo-elephant || \