From 7c0cf35643c26c29d56875e2580eb798b609ad1d Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 7 Jul 2004 09:37:20 +0000 Subject: 2004-07-07 Roland McGrath * 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. --- Makefile | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'Makefile') 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) -- cgit 1.4.1