2004-10-18 Maciej W. Rozycki <macro@mips.com>
[glibc-ports.git] / Makefile
bloba65257be82b0592632a645fbcc8cf932821ba5e4
1 # This boilerplate is necessary just because any add-on directory
2 # gets added as a normal subdirectory for the glibc build process.
4 subdir = ports
6 include ../Rules
8 .PHONY: dist dist-ports
9 dist: dist-ports
11 # Do `make dist dist-version=X.Y.Z' to make tar files of an older version.
12 dist-version = $(version)
13 # Also try 'dist-tag=some="-r TAG"' (or -D DATE) to get some tag rather
14 # than the release tag for X.Y.Z.
15 dist-tag = -r glibc-$(subst .,_,$(dist-version))
17 distname = glibc-ports-$(dist-version)
19 do-export = cvs $(CVSOPTS) -Q export -d $(basename $@) $(dist-tag)
21 dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z)
22 md5sum $^
23 $(distname).tar:
24 @rm -fr $(basename $@)
25 $(do-export) ports
26 tar cf $@ $(basename $@)
27 rm -fr $(basename $@)
29 .PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files.
30 dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z)
31 md5sum $^
32 glibc-port-%-$(dist-version).tar: configure ChangeLog
33 @rm -fr $(basename $@)
34 $(do-export) -l ports
35 rm -f $(basename $@)/ChangeLog.[a-z]*
36 $(do-export) ports/ChangeLog.$* \
37 ports/sysdeps/$* ports/sysdeps/unix/sysv/linux/$*
38 mv $(basename $@)/ports/* $(basename $@)/
39 rmdir $(basename $@)/ports
40 tar cf $@ $(basename $@)
41 rm -fr $(basename $@)