commit:     99f303d1e9dec2b8d31d99c361572b91d67f9156
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 18 16:32:07 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Aug 18 16:32:07 2015 +0000
URL:        https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=99f303d1

build: refresh autotool regen logic for git

 Makefile        | 34 ++++++++++++++++++----------------
 Makefile.am     | 49 ++++++++++++++++++++++++++++++++++++++++++++++---
 make-tarball.sh |  2 +-
 man/.cvsignore  |  1 -
 4 files changed, 65 insertions(+), 21 deletions(-)

diff --git a/Makefile b/Makefile
index 4b0f862..ba3b6a2 100644
--- a/Makefile
+++ b/Makefile
@@ -152,23 +152,25 @@ check test:
 # All logic related to autotools is below here
 #
 GEN_MARK_START = \# @@@ GEN START @@@ \#
-GEN_MARK_END   = \# @@@ GEN START @@@ \#
-EXTRA_DIST = \
-       $(shell find -type f)
-MAKE_MULTI_LINES = $(patsubst %,\\\\\n\t%,$(sort $(1)))
-# 2nd level of indirection here is so the $(find) doesn't pick up
-# files in EXTRA_DIST that get cleaned up ...
-autotools-update: clean
-       $(MAKE) _autotools-update
-_autotools-update:
+GEN_MARK_END   = \# @@@ GEN END @@@ \#
+EXTRA_DIST     = $(shell git ls-files)
+autotools-update:
+       $(MAKE) -C man -j
        sed -i '/^$(GEN_MARK_START)$$/,/^$(GEN_MARK_END)$$/d' Makefile.am
-       printf '%s\ndist_man_MANS += %b\nEXTRA_DIST += %b\n%s\n' \
-               "$(GEN_MARK_START)" \
-               "$(call MAKE_MULTI_LINES,$(wildcard man/*.1))" \
-               "$(call MAKE_MULTI_LINES,$(EXTRA_DIST))" \
-               "$(GEN_MARK_END)" \
-               >> Makefile.am
-autotools: autotools-update
+       ( \
+               echo "$(GEN_MARK_START)"; \
+               printf 'dist_man_MANS +='; \
+               printf ' \\\n\t%s' $(wildcard man/*.1); \
+               echo; \
+               printf 'EXTRA_DIST +='; \
+               printf ' \\\n\t%s' $(EXTRA_DIST); \
+               echo; \
+               echo "$(GEN_MARK_END)"; \
+       ) >> Makefile.am
+autotools:
+ifeq ($(SKIP_AUTOTOOLS_UPDATE),)
+       $(MAKE) autotools-update
+endif
        ./autogen.sh --from=make
 
 .PHONY: autotools autotools-update _autotools-update

diff --git a/Makefile.am b/Makefile.am
index 57aecfa..5db3f75 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,8 +42,49 @@ dist_man_MANS =
 EXTRA_DIST = autotools/m4/gnulib-cache.m4
 
 # @@@ GEN START @@@ #
-dist_man_MANS += 
+dist_man_MANS += \
+       man/dumpelf.1 \
+       man/pspax.1 \
+       man/scanmacho.1 \
+       man/scanelf.1
 EXTRA_DIST += \
+       .depend \
+       .gitignore \
+       BUGS \
+       COPYING \
+       Makefile \
+       Makefile.am \
+       README \
+       TODO \
+       autogen.sh \
+       configure.ac \
+       dumpelf.c \
+       elf.h \
+       lddtree.py \
+       lddtree.sh \
+       macho.h \
+       make-tarball.sh \
+       man/Makefile \
+       man/custom.xsl \
+       man/dumpelf.docbook \
+       man/fragment/date \
+       man/fragment/reftail \
+       man/fragment/version \
+       man/pax-utils.docbook \
+       man/pspax.docbook \
+       man/scanelf.docbook \
+       man/scanmacho.docbook \
+       paxelf.c \
+       paxelf.h \
+       paxinc.c \
+       paxinc.h \
+       paxmacho.c \
+       paxmacho.h \
+       porting.h \
+       pspax.c \
+       scanelf.c \
+       scanmacho.c \
+       symtree.sh \
        tests/Makefile \
        tests/lddtree/Makefile \
        tests/lddtree/dotest.cmp \
@@ -56,5 +97,7 @@ EXTRA_DIST += \
        tests/scanelf/scanelf.simple.good \
        tests/source/Makefile \
        tests/source/dotest \
-       tests/source/space
-# @@@ GEN START @@@ #
+       tests/source/space \
+       xfuncs.c \
+       xfuncs.h
+# @@@ GEN END @@@ #

diff --git a/make-tarball.sh b/make-tarball.sh
index e99c44d..04f778d 100755
--- a/make-tarball.sh
+++ b/make-tarball.sh
@@ -49,7 +49,7 @@ make -C man
 einfo "Building autotools ..."
 sed -i "/^AC_INIT/s:git:${ver}:" configure.ac
 sed -i "1iPV := ${ver}" Makefile
-LC_ALL=C ${MAKE} -s autotools >/dev/null
+SKIP_AUTOTOOLS_UPDATE=true LC_ALL=C ${MAKE} -s autotools >/dev/null
 rm -rf autom4te.cache
 
 popd >/dev/null

diff --git a/man/.cvsignore b/man/.cvsignore
deleted file mode 100644
index f7e585b..0000000
--- a/man/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.1

Reply via email to