From 012e1abb4f883739bba46a7813b6c33289883dff Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Sat, 3 Jul 1999 19:35:08 +0000 Subject: [PATCH] 'make dist' builds an easy distributable tarball --- Makefile.in | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Makefile.in b/Makefile.in index 091e0c8cae..134a17c246 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,8 @@ top_builddir = . ZEND_DIR = $(srcdir)/libzend SUBDIRS=libzend ext @TSRM_DIR@ +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ LN_S = @LN_S@ CC = @CC@ AR = ar rc @@ -138,6 +140,32 @@ distclean: clean distclean-recursive -rm -f do-conf test/test.log -rm -f doc/Makefile regex/Makefile +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +dist: distdir + -chmod -R a+r $(distdir) + tar chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) + +distdir: + -rm -rf $(distdir) + files=`echo *` ;\ + mkdir $(distdir) ;\ + for file in $$files ; do \ + d=$(srcdir); \ + if test -d $$d/$$file ; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + (cd $(distdir) ; $(MAKE) distclean) + find $(distdir) -name CVS -type d | xargs rm -rf + + maintainer-clean-depend: maintainer-clean-depend-recursive bench: $(BINNAME) -- 2.40.0