From 9cb8bd2951f48072247fd7834402e6b6920bd182 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 12 Nov 1995 18:48:13 +0000 Subject: [PATCH] Changed to assume PACKAGE and VERSION are set by configure. --- dist-subd-top.am | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/dist-subd-top.am b/dist-subd-top.am index 2e2c922d..b4e161d0 100644 --- a/dist-subd-top.am +++ b/dist-subd-top.am @@ -1,13 +1,21 @@ -dist: $(DIST_FILES) $(DIST_DIRS) distname - rm -rf `cat distname`; mkdir `cat distname` +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +distdir = $(PACKAGE)-$(VERSION) +dist: $(DIST_FILES) $(DIST_DIRS) + rm -rf $(distdir) + mkdir $(distdir) @for file in $(DIST_FILES); do \ echo linking $$file; \ - ln $(srcdir)/$$file `cat distname`/$$file || \ - { echo copying $$file instead; cp -p $(srcdir)/$$file `cat distname`/$$file;}; \ + ln $(srcdir)/$$file $(distdir)/$$file || \ + { echo copying $$file instead; cp -p $(srcdir)/$$file $(distdir)/$$file;}; \ + done + for subdir in $(SUBDIRS); do \ + mkdir $(distdir)/$$subdir || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir; $(MAKE) subdir=$$subdir $@) || exit 1; \ done - for subdir in $(SUBDIRS); do \ - (cd $$subdir; $(MAKE) subdir=$$subdir $@); done - chmod -R a+r `cat distname` - tar -chozf `cat distname`.tar.gz `cat distname` - rm -rf `cat distname` distname + chmod -R a+r $(distdir) + tar -chozf $(distdir).tar.gz $(distdir) + rm -rf $(distdir) -- 2.43.5