2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
[glibc-ports.git] / Makefile
blobd1cbbef4899d5e6eb26e22ecd75eb6347b72aa61
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 $(MAKE) -q `find sysdeps -name configure`
26 $(do-export) ports
27 find $(basename $@) -name configure -print | xargs touch
28 tar cf $@ $(basename $@)
29 rm -fr $(basename $@)
31 sysdeps-of-stem = sysdeps/$* sysdeps/unix/sysv/linux/$*
33 .PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files.
34 dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z)
35 md5sum $^
36 glibc-port-%-$(dist-version).tar: configure ChangeLog
37 @rm -fr $(basename $@)
38 $(do-export) -l ports
39 rm -f $(basename $@)/ChangeLog.[a-z]*
40 $(MAKE) -q `find $(sysdeps-of-stem) -name configure`
41 $(do-export) ports/ChangeLog.$* $(addprefix ports/,$(sysdeps-of-stem))
42 mv $(basename $@)/ports/* $(basename $@)/
43 rmdir $(basename $@)/ports
44 find $(basename $@) -name configure -print | xargs touch
45 tar cf $@ $(basename $@)
46 rm -fr $(basename $@)