From: Roland McGrath Date: Sat, 23 Oct 2004 04:07:06 +0000 (+0000) Subject: 2004-10-22 Roland McGrath X-Git-Tag: upstream/2.20~3636^2~1112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=556e06df466df56066f7154ea6c14dd4b3193ea4;p=platform%2Fupstream%2Flinaro-glibc.git 2004-10-22 Roland McGrath * Makefile (dist, dist-ports): New target. (dist-port-%): New pattern rule. * Makeconfig [!subdir] (ports/%): New pattern rule. --- diff --git a/Makeconfig b/Makeconfig index 20a0f08..92158be 100644 --- a/Makeconfig +++ b/Makeconfig @@ -33,3 +33,9 @@ $(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \ $(autoconf-it) endif # $(AUTOCONF) = no + +# This allows e.g. `make ports/dist' from a build directory. +ifndef subdir +ports/%: + $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F) +endif diff --git a/Makefile b/Makefile index 463f278..a65257b 100644 --- a/Makefile +++ b/Makefile @@ -4,3 +4,38 @@ subdir = ports include ../Rules + +.PHONY: dist dist-ports +dist: dist-ports + +# Do `make dist dist-version=X.Y.Z' to make tar files of an older version. +dist-version = $(version) +# Also try 'dist-tag=some="-r TAG"' (or -D DATE) to get some tag rather +# than the release tag for X.Y.Z. +dist-tag = -r glibc-$(subst .,_,$(dist-version)) + +distname = glibc-ports-$(dist-version) + +do-export = cvs $(CVSOPTS) -Q export -d $(basename $@) $(dist-tag) + +dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z) + md5sum $^ +$(distname).tar: + @rm -fr $(basename $@) + $(do-export) ports + tar cf $@ $(basename $@) + rm -fr $(basename $@) + +.PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files. +dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z) + md5sum $^ +glibc-port-%-$(dist-version).tar: configure ChangeLog + @rm -fr $(basename $@) + $(do-export) -l ports + rm -f $(basename $@)/ChangeLog.[a-z]* + $(do-export) ports/ChangeLog.$* \ + ports/sysdeps/$* ports/sysdeps/unix/sysv/linux/$* + mv $(basename $@)/ports/* $(basename $@)/ + rmdir $(basename $@)/ports + tar cf $@ $(basename $@) + rm -fr $(basename $@)