aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-07-07 09:37:20 +0000
committerRoland McGrath <roland@gnu.org>2004-07-07 09:37:20 +0000
commit7c0cf35643c26c29d56875e2580eb798b609ad1d (patch)
tree910f498c8a1cc50969a97bca0317368327ef4287 /Makefile
parent8e5aaad9daee699404f00c79100dfd88781eedf5 (diff)
downloadglibc-7c0cf35643c26c29d56875e2580eb798b609ad1d.tar
glibc-7c0cf35643c26c29d56875e2580eb798b609ad1d.tar.gz
glibc-7c0cf35643c26c29d56875e2580eb798b609ad1d.tar.bz2
glibc-7c0cf35643c26c29d56875e2580eb798b609ad1d.zip
2004-07-07 Roland McGrath <roland@frob.com>
* Makefile (dist-separate): New variable. (glibc-%.tar rule): Make separate tar files for add-ons listed there. Depend on their configure files. (dist-do-separate-dirs): New canned sequence to do that. (dist-separate-libidn, dist-separate-linuxthreads): New variables. (dist): Depend on add-on tar files based on $(dist-separate). (dist-version): New variable, default to $(version). (tag-for-dist, dist): Use that in place of $(version) in deps.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 24 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index da743e4f51..4357ea9d8f 100644
--- a/Makefile
+++ b/Makefile
@@ -277,23 +277,40 @@ files-for-dist := README FAQ INSTALL NOTES configure
tag-of-stem = glibc-$(subst .,_,$*)
-glibc-%.tar glibc-linuxthreads-%.tar: $(files-for-dist)
+# Add-ons in the main repository but distributed in their own tar files.
+dist-separate = libidn linuxthreads
+
+# Directories in each add-on.
+dist-separate-libidn = libidn
+dist-separate-linuxthreads = linuxthreads linuxthreads_db
+
+glibc-%.tar $(dist-separate:%=glibc-%-%.tar): $(files-for-dist) \
+ $(foreach D,$(dist-separate),\
+ $D/configure)
@rm -fr glibc-$*
cvs $(CVSOPTS) -Q export -d glibc-$* -r $(tag-of-stem) libc
- tar cf glibc-linuxthreads-$*.tar -C glibc-$* \
- linuxthreads linuxthreads_db
- rm -rf $(addprefix glibc-$*/,linuxthreads linuxthreads_db)
+ $(dist-do-separate-dirs)
tar cf glibc-$*.tar glibc-$*
rm -fr glibc-$*
+define dist-do-separate-dirs
+$(foreach dir,$(dist-separate),
+ tar cf glibc-$(dir)-$*.tar -C glibc-$* $(dist-separate-$(dir))
+ rm -rf $(addprefix glibc-$*/,$(dist-separate-$(dir)))
+)
+endef
%.bz2: %; bzip2 -9vk $<
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
-dist: $(foreach Z,.bz2 .gz,glibc-$(version).tar$Z \
- glibc-linuxthreads-$(version).tar$Z)
+# Do `make dist dist-version=X.Y.Z' to make tar files of an older version.
+dist-version = $(version)
+
+dist: $(foreach Z,.bz2 .gz,glibc-$(dist-version).tar$Z \
+ $(foreach D,$(dist-separate),\
+ glibc-$D-$(dist-version).tar$Z))
md5sum $^
-tag-for-dist: tag-$(version)
+tag-for-dist: tag-$(dist-version)
tag-%: $(files-for-dist)
cvs $(CVSOPTS) -Q tag -c $(tag-of-stem)