summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r--scripts/Makefile.am63
1 files changed, 58 insertions, 5 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 4ef3ce0e..57468f93 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -28,7 +28,8 @@ EXTRA_DIST = \
pacman-optimize.sh.in \
pkgdelta.sh.in \
repo-add.sh.in \
- $(LIBRARY)
+ $(LIBRARY) \
+ $(LIBMAKEPKG_DIST)
LIBRARY = \
library/output_format.sh \
@@ -37,10 +38,39 @@ LIBRARY = \
library/size_to_human.sh \
library/term_colors.sh
-# Files that should be removed, but which Automake does not know.
-MOSTLYCLEANFILES = $(bin_SCRIPTS)
+libmakepkgdir = $(datarootdir)/makepkg
+
+LIBMAKEPKGDIRS = \
+ lint_package \
+ tidy \
+ util
+
+LIBMAKEPKG = \
+ libmakepkg/util/message.sh \
+ libmakepkg/util/option.sh
+
+LIBMAKEPKG_IN = \
+ libmakepkg/lint_package.sh \
+ libmakepkg/lint_package/build_references.sh \
+ libmakepkg/lint_package/missing_backup.sh \
+ libmakepkg/tidy.sh \
+ libmakepkg/tidy/docs.sh \
+ libmakepkg/tidy/emptydirs.sh \
+ libmakepkg/tidy/libtool.sh \
+ libmakepkg/tidy/optipng.sh \
+ libmakepkg/tidy/purge.sh \
+ libmakepkg/tidy/staticlibs.sh \
+ libmakepkg/tidy/strip.sh \
+ libmakepkg/tidy/upx.sh \
+ libmakepkg/tidy/zipman.sh \
+ libmakepkg/util.sh
+
+LIBMAKEPKG_DIST = \
+ $(LIBMAKEPKG) \
+ $(addsuffix .in, $(LIBMAKEPKG_IN))
-libmakepkgdir = $(libdir)/makepkg
+# Files that should be removed, but which Automake does not know.
+MOSTLYCLEANFILES = $(bin_SCRIPTS) $(LIBMAKEPKG_IN)
clean-local:
$(AM_V_at)$(RM) -r .lib
@@ -87,10 +117,18 @@ $(OURSCRIPTS): Makefile
$(AM_V_at)chmod +x,a-w $@
@$(BASH_SHELL) -O extglob -n $@
+$(LIBMAKEPKG_IN): %: %.in Makefile
+ $(AM_V_at)$(RM) $@
+ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN)test -f $(srcdir)/$@.in && $(edit) $(srcdir)/$@.in >$@
+ $(AM_V_at)chmod a-w $@
+ @$(BASH_SHELL) -O extglob -n $@
+
makepkg: \
$(srcdir)/makepkg.sh.in \
$(srcdir)/makepkg-wrapper.sh.in \
- $(srcdir)/library/parseopts.sh
+ $(srcdir)/library/parseopts.sh \
+ $(LIBMAKEPKG_IN)
makepkg-template: \
$(srcdir)/makepkg-template.pl.in \
@@ -150,6 +188,15 @@ install-exec-hook:
cd $(DESTDIR)$(bindir) && \
$(RM) makepkg makepkg-wrapper
$(INSTALL) .lib/makepkg $(DESTDIR)$(bindir)/makepkg
+ for dir in $(LIBMAKEPKGDIRS); do \
+ $(MKDIR_P) $(DESTDIR)$(libmakepkgdir)/$$dir; \
+ done
+ for lib in $(LIBMAKEPKG); do \
+ $(INSTALL) $(srcdir)/$$lib $(DESTDIR)$(libmakepkgdir)/$${lib#libmakepkg}; \
+ done
+ for lib in $(LIBMAKEPKG_IN); do \
+ $(INSTALL) $$lib $(DESTDIR)$(libmakepkgdir)/$${lib#libmakepkg}; \
+ done
cd $(DESTDIR)$(bindir) && \
$(RM) repo-elephant && \
( $(LN_S) repo-add repo-elephant || \
@@ -164,5 +211,11 @@ install-exec-hook:
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
$(RM) repo-remove repo-elephant
+ for lib in $(LIBMAKEPKG) $(LIBMAKEPKG_IN); do \
+ $(RM) $(DESTDIR)$(libmakepkgdir)/$${lib#libmakepkg}; \
+ done
+ for dir in $(LIBMAKEPKGDIRS); do \
+ $(RM) -r $(DESTDIR)$(libmakepkgdir)/$$dir; \
+ done
# vim:set noet: