* make dist in glibc-ports
@ 2010-11-29 21:45 Alfred M. Szmidt
2010-11-30 23:38 ` Roland McGrath
0 siblings, 1 reply; 2+ messages in thread
From: Alfred M. Szmidt @ 2010-11-29 21:45 UTC (permalink / raw)
To: libc-ports
Hi,
seems I already wrote this a long time ago and didn't notice, what do
people think? I'll whip up a ChangeLog and send something that can be
commited by someone.
--- a/Makefile
+++ b/Makefile
@@ -1,43 +1,33 @@
# This makefile is not used by the glibc build process.
# It's purely for making ports tarballs.
-.PHONY: dist dist-ports
-dist: dist-ports
+.PHONY: dist dist-prepare
-# 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)
+# Regenerate stuff, then error if these things are not committed yet.
+dist-prepare: ChangeLog
+ conf=`find sysdeps -name configure`; \
+ $(MAKE) $$conf && \
+ git diff --stat HEAD -- $^ $$conf \
+ | awk '{ print; rc=1 } END { exit rc }'
-dist-ports: $(foreach Z,.bz2 .gz,$(distname).tar$Z)
- md5sum $^
-$(distname).tar:
- @rm -fr $(basename $@)
- $(MAKE) -q `find sysdeps -name configure`
- $(do-export) ports
- find $(basename $@) -name configure -print | xargs touch
- tar cf $@ $(basename $@)
- rm -fr $(basename $@)
-
-sysdeps-of-stem = sysdeps/$* sysdeps/unix/sysv/linux/$*
+%.tar:
+ git archive --prefix=$*/ $(subst glibc-ports,glibc,$*) > $@.new
+ mv -f $@.new $@
-.PRECIOUS: %.gz %.bz2 # Don't delete output as intermediate files.
-dist-port-%: $(foreach Z,.bz2 .gz,glibc-port-%-$(dist-version).tar$Z)
+# Do `make dist dist-version=X.Y.Z' to make tar files of an older version.
+ifneq (,$(strip $(subst glibc,glibc-ports,$(dist-version))))
+dist: $(foreach Z,.bz2 .gz .xz,$(subst glibc,glibc-ports,$(dist-version)).tar$Z)
md5sum $^
-glibc-port-%-$(dist-version).tar: ChangeLog.%
- @rm -fr $(basename $@)
- $(MAKE) -q `find $(sysdeps-of-stem) -name configure`
- $(do-export) ports/ChangeLog.$* $(addprefix ports/,$(sysdeps-of-stem))
- mv $(basename $@)/ports/* $(basename $@)/
- rmdir $(basename $@)/ports
- find $(basename $@) -name configure -print | xargs touch
- tar cf $@ $(basename $@)
- rm -fr $(basename $@)
+else
+dist: dist-prepare
+ @if v=`git describe`; then \
+ echo Distribution version $$v; \
+ $(MAKE) dist dist-version=$$v; \
+ else \
+ false; \
+ fi
+endif
%.bz2: %; bzip2 -9vk $<
%.gz: %; gzip -9vnc $< > $@.new && mv -f $@.new $@
+%.xz: %; xz -9evk $<
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: make dist in glibc-ports
2010-11-29 21:45 make dist in glibc-ports Alfred M. Szmidt
@ 2010-11-30 23:38 ` Roland McGrath
0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2010-11-30 23:38 UTC (permalink / raw)
To: ams; +Cc: libc-ports
That looks like it's mostly copied from the main tree dist stuff.
If it's faithfully copied, then that's probably fine.
Immediate problems I see are where you didn't copy faithfully:
%.tar should depend on FORCE.
That subst should not be there.
Thanks,
Roland
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-30 23:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29 21:45 make dist in glibc-ports Alfred M. Szmidt
2010-11-30 23:38 ` Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).