1
0
mirror of https://git.savannah.gnu.org/git/gperf.git synced 2025-12-02 13:09:22 +00:00

Create tarballs through an Automake-like "make dist" command.

This commit is contained in:
Bruno Haible
2012-07-01 14:46:34 +02:00
parent b392998058
commit 9386cd6fc4
6 changed files with 194 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
# Makefile for gperf
# Copyright (C) 1989, 1992, 1993, 1998, 2002 Free Software Foundation, Inc.
# Copyright (C) 1989, 1992, 1993, 1998, 2002, 2012 Free Software Foundation, Inc.
# Written by Douglas C. Schmidt <schmidt@ics.uci.edu>
# and Bruno Haible <bruno@clisp.org>.
#
@@ -58,5 +58,42 @@ maintainer-clean : force
cd @subdir@; if test -f Makefile; then $(MAKE) maintainer-clean; fi
$(RM) config.status config.log config.cache Makefile
# List of source files.
SOURCE_FILES = \
README README.woe32 README.vms NEWS AUTHORS \
configure.ac aclocal.m4 Makefile.in Makefile.msvc Makefile.vms \
Makefile.devel ChangeLog
# List of distributed files imported from other packages.
IMPORTED_FILES = COPYING INSTALL mkinstalldirs
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = configure
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p $$dir/$$file '$(distdir)'/$$file || exit 1; \
done
subdir=@subdir@; test -d '$(distdir)'/$$subdir || mkdir '$(distdir)'/$$subdir; cd $$subdir; $(MAKE) distdir distdir='$(distdir)'/$$subdir
# Creating a distribution tarball.
PACKAGE = gperf
VERSION = `sed -n -e 's/.*version_string = "\(.*\)".*/\1/p' < src/version.cc`
TAR = tar
GZIP = gzip
dist : force
tmpdistdir=$(PACKAGE)-$(VERSION); \
abstmpdistdir=`pwd`/$$tmpdistdir; \
rm -rf $$tmpdistdir $$tmpdistdir.tar $$tmpdistdir.tar.gz \
&& mkdir $$tmpdistdir \
&& $(MAKE) distdir distdir="$$abstmpdistdir" \
&& $(TAR) chof $$tmpdistdir.tar --owner=root --group=root $$tmpdistdir \
&& $(GZIP) -9 $$tmpdistdir.tar \
&& rm -rf $$tmpdistdir
force :