summaryrefslogtreecommitdiff
path: root/Makeconf
diff options
context:
space:
mode:
Diffstat (limited to 'Makeconf')
-rw-r--r--Makeconf52
1 files changed, 31 insertions, 21 deletions
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