From 50bfb9acf98d5f4c0c5948cc28285e990b40b659 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Sun, 8 Apr 2012 23:10:42 +0200 Subject: Replace fragile manual »make dist« system with one based on »git archive«. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Makeconf (lndist): Remove target. (dist-hook, dist.tar): New targets. * Makefile (dist): Rewrite this target's as well as accompanying rules. (%-lndist, cp-linked-files, $(lf-inst)): Remove targets. (%.bz2, %.gz, %/dist-hook): New targets. (DISTFILES): Set. * doc/Makefile (DISTFILES): Set. * doc/Makefile (lndist, lndist-info-targets): Remove targets. * include/Makefile (lndist): Remove target. * libthreads/Makefile (lndist, lndist-i386-files, lndist-map-file): Remove targets. * pfinet/Makefile (lndist, lndist-linux-src-net-core-files) (lndist-linux-src-net-ethernet-files, lndist-linux-src-net-ipv4-files) (lndist-linux-src-net-ipv6-files, lndist-linux-src-asm-files) (lndist-linux-src-include-linux-files, lndist-linux-src-include-net-files) (lndist-linux-src-include-asm-files, lndist-glue-include-linux-files) (lndist-glue-include-asm-files): Remove targets. * auth/Makefile (LCLHDRS): Don't set. * boot/Makefile (LCLHDRS, DIST_FILES): Likewise. * bsdfsck/Makefile (LCLHDRS): Likewise. * config/Makefile (DIST_FILES): Likewise. * console-client/Makefile (LCLHDRS): Likewise. * console/Makefile (LCLHDRS, DIST_FILES): Likewise. * doc/Makefile (DIST_FILES): Likewise. * exec/Makefile (LCLHDRS, DIST_FILES): Likewise. * ext2fs/Makefile (LCLHDRS): Likewise. * fatfs/Makefile (LCLHDRS): Likewise. * ftpfs/Makefile (LCLHDRS): Likewise. * hostmux/Makefile (LCLHDRS): Likewise. * hurd/Makefile (DIST_FILES): Likewise. * include/Makefile (LCLHDRS): Likewise. * isofs/Makefile (LCLHDRS, DIST_FILES): Likewise. * libcons/Makefile (LCLHDRS): Likewise. * libdirmgt/Makefile (LCLHDRS): Likewise. * libdiskfs/Makefile (LCLHDRS): Likewise. * libfshelp/Makefile (LCLHDRS): Likewise. * libftpconn/Makefile (LCLHDRS): Likewise. * libihash/Makefile (LCLHDRS): Likewise. * libiohelp/Makefile (LCLHDRS): Likewise. * libnetfs/Makefile (LCLHDRS): Likewise. * libpager/Makefile (LCLHDRS): Likewise. * libpipe/Makefile (LCLHDRS): Likewise. * libports/Makefile (LCLHDRS): Likewise. * libps/Makefile (LCLHDRS): Likewise. * libshouldbeinlibc/Makefile (LCLHDRS): Likewise. * libstore/Makefile (LCLHDRS, DIST_FILES): Likewise. * libthreads/Makefile (LCLHDRS): Likewise. * libtreefs/Makefile (LCLHDRS): Likewise. * libtrivfs/Makefile (LCLHDRS): Likewise. * mach-defpager/Makefile (LCLHDRS): Likewise. * nfs/Makefile (LCLHDRS): Likewise. * nfsd/Makefile (LCLHDRS): Likewise. * pfinet/Makefile (LCLHDRS): Likewise. * pflocal/Makefile (LCLHDRS): Likewise. * proc/Makefile (LCLHDRS, DIST_FILES): Likewise. * release/Makefile (DIST_FILES): Likewise. * storeio/Makefile (LCLHDRS): Likewise. * sutils/Makefile (LCLHDRS): Likewise. * term/Makefile (LCLHDRS, DIST_FILES): Likewise. * tmpfs/Makefile (LCLHDRS): Likewise. * ufs-fsck/Makefile (LCLHDRS): Likewise. * ufs/Makefile (LCLHDRS): Likewise. * usermux/Makefile (LCLHDRS): Likewise. * utils/Makefile (LCLHDRS): Likewise. --- Makeconf | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) (limited to 'Makeconf') diff --git a/Makeconf b/Makeconf index 538202cb..cb61fdbb 100644 --- a/Makeconf +++ b/Makeconf @@ -1,4 +1,4 @@ -# Generic configuration for Hurd compilation +# Generic configuration for Hurd compilation -*- makefile-gmake -*- # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, # 2006, 2007, 2008, 2010, 2011, 2012 Free Software Foundation, Inc. @@ -27,12 +27,12 @@ # Every makefile should define # SRCS (all actual source code) -# LCLHDRS (all source headers in this directory [NOT MiG created]) # OBJS (all .o files used to produce some target). # HURDLIBS (all Hurd libraries used; with no directory name or `lib' attached) # For types `server' and `utility' an automatic dependency will be # written for these, and type `library' will include a .so dependency. # Types `servers' and `utilities'; you have to do it yourself. +# DISTFILES (any built files to be included in distributions). # Types `server' and `utility' should define # target (the name of the program built) @@ -219,7 +219,7 @@ BUGADDR_REF = -uargp_program_bug_address # Standard targets -.PHONY: all install libs relink clean objs +.PHONY: all install libs relink dist-hook clean objs # Just build all the object files. objs: $(OBJS) @@ -403,18 +403,6 @@ $(..)$(dir).d: $(srcdir)/Makefile rm -f $@ echo $(dir): $(hurd-bug-addr-dir-dep) $(addprefix lib,$(HURDLIBS)) > $@ -# Making a snapshot -distfiles = Makefile $(SRCS) $(LCLHDRS) $(DIST_FILES) -lndist: $(distfiles) $(top_srcdir)/hurd-snap/$(dir) FORCE - ln $(addprefix $(srcdir)/,$(distfiles)) $(top_srcdir)/hurd-snap/$(dir) - -ifeq ($(dir),.) -$(top_srcdir)/hurd-snap/$(dir): -else -$(top_srcdir)/hurd-snap/$(dir): - mkdir $@ -endif - # TAGS files ifneq ($(dir),.) ifdef configured @@ -442,19 +430,41 @@ endif endif endif +.PHONY: dist-hook +ifdef DISTFILES +dist-hook: dist.tar +else +# Don't bother creating an empty tarball. +dist-hook: +endif + +# FORCE is needed as $(dist-version) can change between two invocations. +dist.tar: $(DISTFILES) FORCE + @[ x$(dist-version) != x ] || \ + { echo >&2 Can\''t make $@ without dist-version set.' && \ + false; } + tar -c -f $@ --files-from=/dev/null +# Every file from $(DISTFILES) can exist either in the build directory or in +# the source directory, but that must not affect the name it gets in dist.tar. + for f in $(DISTFILES); do \ + if test -e "$$f"; then d=.; else d=$(srcdir); fi && \ + tar --append -f $@ \ + --transform=s%^%$(dist-version)/$(dir)/% -C "$$d" "$$f" \ + || exit $$?; \ + done + # Cleaning -ifeq ($(clean),yes) clean: + rm -f dist.tar +ifeq ($(clean),yes) rm -f *.d *.o *Server.c *User.c *_S.h *_U.h *.[su]defsi \ $(cleantarg) -relink: - rm -f $(linktarg) endif -clean: relink: - - +ifeq ($(clean),yes) + rm -f $(linktarg) +endif # Subdependencies -- cgit v1.2.3