diff options
-rw-r--r-- | Makefile.in (renamed from Makefile) | 84 | ||||
-rw-r--r-- | config/install-sh | 276 | ||||
-rw-r--r-- | configure.ac | 136 | ||||
-rw-r--r-- | quilt.changes | 6 |
4 files changed, 470 insertions, 32 deletions
@@ -1,29 +1,36 @@ -PACKAGE := quilt -VERSION := 0.21 -RELEASE := 1 - -prefix := /usr/local -bindir := $(prefix)/bin -datadir := $(prefix)/share +PACKAGE := @PACKAGE_NAME@ +VERSION := @PACKAGE_VERSION@ +RELEASE := @PACKAGE_RELEASE@ +PACKAGE_BUGREPORT := @PACKAGE_BUGREPORT@ + +prefix := @prefix@ +exec_prefix := @exec_prefix@ +bindir := @bindir@ +libdir := @libdir@ +datadir := @datadir@ mandir := $(datadir)/man docdir := $(datadir)/doc/packages QUILT_DIR = $(datadir)/$(PACKAGE) SCRIPTS_DIR = $(QUILT_DIR)/scripts -LIB_DIR = $(prefix)/lib/$(PACKAGE) +LIB_DIR = $(libdir)/$(PACKAGE) + +INSTALL := @INSTALL@ +PERL := @PERL@ +BASH := @BASH@ +DIFF := @DIFF@ +PATCH := @PATCH@ +MKTEMP := @MKTEMP@ -PERL := /usr/bin/perl -BASH := /bin/bash -DIFF := /usr/bin/diff -PATCH := /usr/bin/patch -MKTEMP := /bin/mktemp +CFLAGS := @CFLAGS@ -Wall -CFLAGS = -g -Wall +ISODATE := $(shell date +%Y-%m-%d) #----------------------------------------------------------------------- DIRT += $(shell find -name '*~') -SRC += COPYING AUTHORS TODO BUGS Makefile \ +SRC += COPYING AUTHORS TODO BUGS Makefile.in \ + configure.ac configure config/install-sh \ quilt.spec.in quilt.spec quilt.changes DIRT += quilt.spec @@ -73,6 +80,9 @@ scripts : $(BIN:%=bin/%) $(QUILT:%=quilt/%) $(SCRIPTS:%=scripts/%) \ dist : $(PACKAGE)-$(VERSION).tar.gz +dist-snapshot : $(PACKAGE)-$(ISODATE).tar.bz2 + + rpm : $(PACKAGE)-$(VERSION).tar.gz rpm -tb $< @@ -97,33 +107,40 @@ bin/guards.1 : bin/guards pod2man $< > $@ $(PACKAGE)-$(VERSION).tar.gz : $(SRC) - rm -f $(PACKAGE)-$(VERSION) + rm -f $(PACKAGE)-$(VERSION) $@ ln -s . $(PACKAGE)-$(VERSION) - tar cfz $(PACKAGE)-$(VERSION).tar.gz \ - $(+:%=$(PACKAGE)-$(VERSION)/%) + tar chf - $(+:%=$(PACKAGE)-$(VERSION)/%) | gzip -9 > $@ rm -f $(PACKAGE)-$(VERSION) @echo "File $@ created." +$(PACKAGE)-$(ISODATE).tar.bz2 : $(SRC) + rm -f $(PACKAGE)-$(ISODATE) $@ + ln -s . $(PACKAGE)-$(ISODATE) + tar chf - $(+:%=$(PACKAGE)-$(ISODATE)/%) | bzip2 -9 > $@ + rm -f $(PACKAGE)-$(ISODATE) + @echo "File $@ created." + install : all - install -d $(BUILD_ROOT)$(bindir) - install -m 755 $(BIN:%=bin/%) $(BUILD_ROOT)$(bindir)/ + @INSTALL@ -d $(BUILD_ROOT)$(bindir) + @INSTALL@ -m 755 $(BIN:%=bin/%) $(BUILD_ROOT)$(bindir)/ - install -d $(BUILD_ROOT)$(QUILT_DIR) - install -m 755 $(QUILT:%=quilt/%) $(BUILD_ROOT)$(QUILT_DIR)/ + @INSTALL@ -d $(BUILD_ROOT)$(QUILT_DIR) + @INSTALL@ -m 755 $(QUILT:%=quilt/%) $(BUILD_ROOT)$(QUILT_DIR)/ - install -d $(BUILD_ROOT)$(SCRIPTS_DIR) - install -m 755 $(filter-out scripts/patchfns, $(SCRIPTS:%=scripts/%)) \ - $(BUILD_ROOT)$(SCRIPTS_DIR) - install -m 644 scripts/patchfns $(BUILD_ROOT)$(SCRIPTS_DIR) + @INSTALL@ -d $(BUILD_ROOT)$(SCRIPTS_DIR) + @INSTALL@ -m 755 $(filter-out scripts/patchfns, \ + $(SCRIPTS:%=scripts/%)) \ + $(BUILD_ROOT)$(SCRIPTS_DIR) + @INSTALL@ -m 644 scripts/patchfns $(BUILD_ROOT)$(SCRIPTS_DIR) - install -d $(BUILD_ROOT)$(LIB_DIR) - install -m 755 -s $(LIB:%=lib/%) $(BUILD_ROOT)$(LIB_DIR)/ + @INSTALL@ -d $(BUILD_ROOT)$(LIB_DIR) + @INSTALL@ -m 755 -s $(LIB:%=lib/%) $(BUILD_ROOT)$(LIB_DIR)/ - install -d $(BUILD_ROOT)$(docdir)/$(PACKAGE) - install -m 644 doc/README $(BUILD_ROOT)$(docdir)/$(PACKAGE)/ + @INSTALL@ -d $(BUILD_ROOT)$(docdir)/$(PACKAGE) + @INSTALL@ -m 644 doc/README $(BUILD_ROOT)$(docdir)/$(PACKAGE)/ - install -d $(BUILD_ROOT)$(mandir)/man1 - install -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/ + @INSTALL@ -d $(BUILD_ROOT)$(mandir)/man1 + @INSTALL@ -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/ $(PACKAGE).spec : $(PACKAGE).spec.in $(PACKAGE).changes Makefile \ scripts/parse-patch @@ -156,5 +173,8 @@ clean distclean : -e 's:@DIFF''@:$(DIFF):g' \ -e 's:@PATCH''@:$(PATCH):g' \ -e 's:@MKTEMP''@:$(MKTEMP):g' \ + -e 's:@PACKAGE_BUGREPORT''@:$(PACKAGE_BUGREPORT):g' \ + -e 's:@VERSION''@:$(VERSION):g' \ + -e 's:@RELEASE''@:$(RELEASE):g' \ $< > $@ @chmod --reference=$< $@ diff --git a/config/install-sh b/config/install-sh new file mode 100644 index 0000000..36f96f3 --- /dev/null +++ b/config/install-sh @@ -0,0 +1,276 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "$0: no input file specified" >&2 + exit 1 +else + : +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d "$dst" ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f "$src" ] || [ -d "$src" ] + then + : + else + echo "$0: $src does not exist" >&2 + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "$0: no destination specified" >&2 + exit 1 + else + : + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d "$dst" ] + then + dst=$dst/`basename "$src"` + else + : + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' + ' +IFS="${IFS-$defaultIFS}" + +oIFS=$IFS +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS=$oIFS + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp=$pathcomp$1 + shift + + if [ ! -d "$pathcomp" ] ; + then + $mkdirprog "$pathcomp" + else + : + fi + + pathcomp=$pathcomp/ +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd "$dst" && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename "$dst"` + else + : + fi + +# Make a couple of temp file names in the proper directory. + + dsttmp=$dstdir/#inst.$$# + rmtmp=$dstdir/#rm.$$# + +# Trap to clean up temp files at exit. + + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + +# Move or copy the file name to the temp name + + $doit $instcmd "$src" "$dsttmp" && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && + +# Now remove or move aside any old file at destination location. We try this +# two ways since rm can't unlink itself on some systems and the destination +# file might be busy for other reasons. In this case, the final cleanup +# might fail but the new file should still install successfully. + +{ + if [ -f "$dstdir/$dstfile" ] + then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || + $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || + { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi +} && + +# Now rename the file to the real destination. + + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + +fi && + +# The final little trick to "correctly" pass the exit status to the exit trap. + +{ + (exit 0); exit +} diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..b6e6b63 --- /dev/null +++ b/configure.ac @@ -0,0 +1,136 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT([quilt],[0.21],[quilt-dev@nongnu.org]) +AC_CONFIG_AUX_DIR(config) +#AC_PREREQ(2.57) +AC_REVISION ($Revision: 1.1 $) + +PACKAGE_RELEASE=1 +AC_SUBST(PACKAGE_RELEASE) + +dnl Setup for backup-files compilation +AC_HEADER_STDC +AC_CHECK_FUNCS([mkdir]) +AC_CHECK_FUNCS([rmdir]) +AC_CHECK_FUNCS([strchr]) +AC_CHECK_FUNCS([strerror]) +AC_CHECK_FUNCS([strrchr]) +AC_C_CONST +AC_FUNC_STAT + +AC_PROG_INSTALL + +AC_SYS_INTERPRETER +if test "$interpval" != yes ; then + AC_MSG_WARN([no + +bash/perl scripts may not be invoked correctly due to problems with your +systems implementation of #! being either broken or non-existant. +]) +fi + +# Check for Bourne-Again Shell +AC_ARG_WITH(bash, AC_HELP_STRING( + [--with-bash], [name of the bash executable to use]), + [ + BASH="$withval" + AC_SUBST(BASH) + ],[ + AC_PATH_PROG(BASH, bash) + ]) +if test -z "$BASH" ; then + AC_MSG_ERROR([Please specify the location of bash with --with-bash]) +fi + +dnl Check for Perl +AC_ARG_WITH(perl, AC_HELP_STRING( + [--with-perl], [name of the Perl executable to use]), + [ + PERL="$withval" + AC_SUBST(PERL) + ],[ + AC_PATH_PROGS(PERL, [perl perl5]) + ]) +if test -z "$PERL" ; then + AC_MSG_ERROR([Please specify the location of Perl with --with-perl]) +fi + +dnl Checks for mktemp (for creating temporary files and directories) +AC_ARG_WITH(mktemp, AC_HELP_STRING( + [--with-mktemp], [name of the mktemp executable to use]), + [ + MKTEMP="$withval" + AC_SUBST(MKTEMP) + ],[ + AC_PATH_PROG(MKTEMP, mktemp) + ]) +if test -z "$MKTEMP" ; then + AC_MSG_ERROR([Please specify the location of mktemp with --with-mktemp]) +fi + +AC_MSG_CHECKING(whether $MKTEMP -d works) +if tempdir=`$MKTEMP -d /tmp/$PACKAGE_NAME.XXXXXX 2>/dev/null` && \ + rmdir "$tempdir" ; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) + AC_MSG_ERROR([$MKTEMP does not create temporary directories with -d]) +fi + +# Check for diff +AC_ARG_WITH(diff, AC_HELP_STRING( + [--with-diff], [name of the diff executable to use]), + [ + DIFF="$withval" + AC_SUBST(DIFF) + ],[ + AC_PATH_PROG(DIFF, diff) + ]) +if test -z "$DIFF"; then + AC_MSG_ERROR([Please specify the location of diff with --with-diff]) +fi + +# Check for patch +AC_ARG_WITH(patch, AC_HELP_STRING( + [--with-patch], [name of the patch executable to use]), + [ + PATCH="$withval" + AC_SUBST(PATCH) + ],[ + AC_PATH_PROG(PATCH, patch) + ]) +if test -z "$PATCH"; then + AC_MSG_ERROR([Please specify the location of patch with --with-patch]) +fi + +# Sun's patch is a mess, issue a warning. But we are going to continue with +# the build because you might just be lucky. +AC_MSG_CHECKING([whether $PATCH will work]) +if $PATCH -v 2>&1 | grep -q "Sun" >/dev/null 2>&1; then + AC_MSG_RESULT(no) + AC_MSG_WARN([ +Sorry, you have a Sun version of patch which is notoriously buggy. $PACKAGE +may function correctly, or minor errors may occur due to Sun's patch tool. +Please consider upgrading to GNU patch, if you already have GNU patch then you +can supply its path with the '--with-patch=' option. +]) +else + AC_MSG_RESULT(yes) +fi + +AC_CONFIG_FILES(Makefile) +AC_OUTPUT + +dnl Print results +AC_MSG_RESULT([]) +AC_MSG_RESULT([$PACKAGE_NAME version $PACKAGE_VERSION configured.]) +AC_MSG_RESULT([]) +AC_MSG_RESULT([Using '$prefix' for installation prefix.]) + +# we don't need to see this just for the backup-files command +# but we may as well spec it for the future +#AC_MSG_RESULT([Using '$CC' for C compiler.]) +#AC_MSG_RESULT([Building with '$CFLAGS' for C compiler flags.]) +#AC_MSG_RESULT([Building with '$LIBS' for linker flags.]) + +AC_MSG_RESULT([]) +AC_MSG_RESULT([Report bugs to $PACKAGE_BUGREPORT]) diff --git a/quilt.changes b/quilt.changes index 951c7ef..0d38c8c 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Sat Feb 1 18:52:15 CET 2003 - agruen@suse.de + +- Integrate James Rowe's Autoconf setup (with a comple of + additional changes/fixes). + +------------------------------------------------------------------- Fri Jan 31 13:05:18 CET 2003 - agruen@suse.de - Add syntax highlighting tags for emacs and vim. |