]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: update 'make deb' to use tarball
authorBen Myers <bpm@sgi.com>
Thu, 14 Feb 2013 16:54:09 +0000 (10:54 -0600)
committerBen Myers <bpm@sgi.com>
Thu, 14 Feb 2013 23:01:35 +0000 (17:01 -0600)
This patch changes the build process so that 'make deb' uses the same
process of creating a source tree as the release script.

* Add a list of files which go in the release tarball in .gitcensus
  This is needed so that you can create a tarball in a bare release
  tree, when .git is not available.

* Modify the SRCTAR target to include files from .gitcensus and use tar
  instead of git archive.

* Modify the SRCTARINC files to include .gitcensus, and include
  .gitcensus in the 'make realclean' target.

* remove the 'make source-link' target.

Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Nathan Scott <nathans@debian.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
.gitignore
Makefile
include/buildrules

index 525b9b74898b7e5e959b512412f5f98266bc79a7..446d84ebf432ad3b99abbe4ff2c59dbf28668c93 100644 (file)
@@ -5,6 +5,7 @@
 
 # build system
 .census
+.gitcensus
 /include/platform_defs.h
 /include/builddefs
 /install-sh
index 87769cca9561feb84b689a6712b2d21c0dc67ec4..b73bb576e2d03c73d0cec6182723446ce6ed0994 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,8 +30,7 @@ SRCTAR = $(PKG_NAME)-$(PKG_VERSION).tar.gz
 CONFIGURE = aclocal.m4 configure config.guess config.sub install-sh ltmain.sh
 LSRCFILES = configure.ac release.sh README VERSION $(CONFIGURE)
 SRCTARINC = m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
-           m4/ltversion.m4 po/xfsprogs.pot $(CONFIGURE)
-
+           m4/ltversion.m4 po/xfsprogs.pot .gitcensus $(CONFIGURE)
 LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
        conftest* built .census install.* install-dev.* *.gz \
        autom4te.cache/* libtool include/builddefs include/platform_defs.h
@@ -120,7 +119,7 @@ distclean: clean
        $(Q)rm -f $(LDIRT)
 
 realclean: distclean
-       $(Q)rm -f $(CONFIGURE)
+       $(Q)rm -f $(CONFIGURE) .gitcensus
 
 #
 # All this gunk is to allow for a make dist on an unconfigured tree
@@ -137,18 +136,19 @@ ifeq ($(HAVE_BUILDDEFS), no)
        $(Q)$(MAKE) $(MAKEOPTS) -C . $@
 else
        $(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR)
-       $(Q)$(MAKE) $(MAKEOPTS) -C po
-       $(Q)$(MAKE) $(MAKEOPTS) source-link
        $(Q)cd $(SRCDIR) && dpkg-buildpackage
 endif
 
-$(SRCDIR) : $(_FORCE)
+$(SRCDIR) : $(_FORCE) $(SRCTAR)
        rm -fr $@
-       mkdir -p $@
+       $(Q)$(TAR) -zxvf $(SRCTAR)
 
-$(SRCTAR) : default
-       $(Q)git archive --prefix=$(SRCDIR)/ --format=tar v$(PKG_VERSION) > $(SRCDIR).tar 
-       $(Q)$(TAR) --transform "s,^,$(SRCDIR)/," -rf $(SRCDIR).tar \
-          $(SRCTARINC) 
-       $(Q)$(ZIP) $(SRCDIR).tar
+$(SRCTAR) : default $(SRCTARINC) .gitcensus
+       $(Q)$(TAR) --transform "s,^,$(SRCDIR)/," -zcf $(SRCDIR).tar.gz  \
+          `cat .gitcensus` $(SRCTARINC)
        echo Wrote: $@
+
+.gitcensus: $(_FORCE)
+       $(Q)if test -d .git; then \
+         git ls-files > .gitcensus && echo "new .gitcensus"; \
+       fi
index f53b5ee4dc54e8c28cf9854a65d217f6c26e6828..49cb2a4b990c2c101f8ad9ce1ee718e18404ab54 100644 (file)
@@ -23,17 +23,6 @@ $(SUBDIRS):
        $(Q)$(MAKE) $(MAKEOPTS) -q -C $@ || $(MAKE) $(MAKEOPTS) -C $@
 endif
 
-source-link: 
-       @test -z "$$DIR" && DIR="."; \
-       for f in `echo $(SRCFILES) $(SUBDIRS) $(POTHEAD)`; do \
-           if test -d $$f ; then \
-               mkdir $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION)/$$DIR/$$f || exit $$?; \
-               $(MAKEF) DIR=$$DIR/$$f -C $$f $@ || exit $$?; \
-           else \
-               ln $$f $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION)/$$DIR/$$f || exit $$?; \
-           fi; \
-       done
-
 #
 # Standard targets
 #