This commit is contained in:
matthieu 2008-04-12 17:57:53 +00:00
parent fd01a78b07
commit 766b9c6928
7 changed files with 236 additions and 482 deletions

View File

@ -224,7 +224,7 @@ mkfontscale_SOURCES = \
appman_PRE = mkfontscale.man appman_PRE = mkfontscale.man
appmandir = $(APP_MAN_DIR) appmandir = $(APP_MAN_DIR)
appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@)
EXTRA_DIST = $(appman_PRE) EXTRA_DIST = $(appman_PRE) ChangeLog
CLEANFILES = $(appman_DATA) CLEANFILES = $(appman_DATA)
SED = sed SED = sed
@ -245,6 +245,7 @@ MAN_SUBSTS = \
-e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
SUFFIXES = .$(APP_MAN_SUFFIX) .man SUFFIXES = .$(APP_MAN_SUFFIX) .man
MAINTAINERCLEANFILES = ChangeLog
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am $(MAKE) $(AM_MAKEFLAGS) all-am
@ -503,6 +504,9 @@ distdir: $(DISTFILES)
|| exit 1; \ || exit 1; \
fi; \ fi; \
done done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
@ -632,6 +636,7 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
@ -687,8 +692,8 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \
distclean-compile distclean-generic distclean-hdr \ distclean distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \ distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \ dvi-am html html-am info info-am install install-am \
install-appmanDATA install-binPROGRAMS install-data \ install-appmanDATA install-binPROGRAMS install-data \
@ -703,6 +708,13 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \
.man.$(APP_MAN_SUFFIX): .man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@ sed $(MAN_SUBSTS) < $< > $@
.PHONY: ChangeLog
ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
dist-hook: ChangeLog
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View File

@ -1042,7 +1042,7 @@ AC_DEFUN([XORG_MACROS_VERSION],[
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
[XORG_MACROS_version=1.1.5 [XORG_MACROS_version=1.1.6
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
@ -1191,7 +1191,11 @@ AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml XORG_SGML_PATH=$prefix/share/sgml
HAVE_DEFS_ENT= HAVE_DEFS_ENT=
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) if test x"$cross_compiling" = x"yes" ; then
HAVE_DEFS_ENT=no
else
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
fi
AC_PATH_PROG(LINUXDOC, linuxdoc) AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf) AC_PATH_PROG(PS2PDF, ps2pdf)
@ -1463,14 +1467,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`], [`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package]) [Major version of this package])
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then if test "x$PVM" = "x"; then
PVM="0" PVM="0"
fi fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM], [$PVM],
[Minor version of this package]) [Minor version of this package])
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then if test "x$PVP" = "x"; then
PVP="0" PVP="0"
fi fi

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for mkfontscale 1.0.3. # Generated by GNU Autoconf 2.59 for mkfontscale 1.0.4.
# #
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
# #
@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME='mkfontscale' PACKAGE_NAME='mkfontscale'
PACKAGE_TARNAME='mkfontscale' PACKAGE_TARNAME='mkfontscale'
PACKAGE_VERSION='1.0.3' PACKAGE_VERSION='1.0.4'
PACKAGE_STRING='mkfontscale 1.0.3' PACKAGE_STRING='mkfontscale 1.0.4'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG ac_pt_PKG_CONFIG MKFONTSCALE_CFLAGS MKFONTSCALE_LIBS X11_CFLAGS X11_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE PKG_CONFIG ac_pt_PKG_CONFIG MKFONTSCALE_CFLAGS MKFONTSCALE_LIBS X11_CFLAGS X11_LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS'
@ -758,7 +758,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures mkfontscale 1.0.3 to adapt to many kinds of systems. \`configure' configures mkfontscale 1.0.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -824,7 +824,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of mkfontscale 1.0.3:";; short | recursive ) echo "Configuration of mkfontscale 1.0.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -956,7 +956,7 @@ fi
test -n "$ac_init_help" && exit 0 test -n "$ac_init_help" && exit 0
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
mkfontscale configure 1.0.3 mkfontscale configure 1.0.4
generated by GNU Autoconf 2.59 generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc. Copyright (C) 2003 Free Software Foundation, Inc.
@ -970,7 +970,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by mkfontscale $as_me 1.0.3, which was It was created by mkfontscale $as_me 1.0.4, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@ $ $0 $@
@ -1568,7 +1568,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='mkfontscale' PACKAGE='mkfontscale'
VERSION='1.0.3' VERSION='1.0.4'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -3470,7 +3470,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF _ACEOF
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then if test "x$PVM" = "x"; then
PVM="0" PVM="0"
fi fi
@ -3479,7 +3479,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MINOR $PVM #define PACKAGE_VERSION_MINOR $PVM
_ACEOF _ACEOF
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then if test "x$PVP" = "x"; then
PVP="0" PVP="0"
fi fi
@ -3882,7 +3882,7 @@ _ASBOX
} >&5 } >&5
cat >&5 <<_CSEOF cat >&5 <<_CSEOF
This file was extended by mkfontscale $as_me 1.0.3, which was This file was extended by mkfontscale $as_me 1.0.4, which was
generated by GNU Autoconf 2.59. Invocation command line was generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -3945,7 +3945,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
mkfontscale config.status 1.0.3 mkfontscale config.status 1.0.4
configured by $0, generated by GNU Autoconf 2.59, configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -21,7 +21,7 @@ dnl
dnl Process this file with autoconf to create configure. dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57]) AC_PREREQ([2.57])
AC_INIT(mkfontscale, [1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], mkfontscale) AC_INIT(mkfontscale, [1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], mkfontscale)
AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE AM_MAINTAINER_MODE

View File

@ -1,10 +1,9 @@
#! /bin/sh #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects # depcomp - compile a program generating dependencies as side-effects
scriptversion=2007-03-29.01 scriptversion=2005-07-09.11
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -92,20 +91,7 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what ## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm. ## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$? stat=$?
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
@ -215,39 +201,34 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the # current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information. # start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases. # Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
test "x$dir" = "x$object" && dir= tmpdepfile="$stripped.u"
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M "$@" -Wc,-M
else else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M "$@" -M
fi fi
stat=$? stat=$?
if test -f "$tmpdepfile"; then :
else
stripped=`echo "$stripped" | sed 's,^.*/,,'`
tmpdepfile="$stripped.u"
fi
if test $stat -eq 0; then : if test $stat -eq 0; then :
else else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" rm -f "$tmpdepfile"
exit $stat exit $stat
fi fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then if test -f "$tmpdepfile"; then
outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'. # Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to # Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'. # `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the []. sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else else
# The sourcefile does not contain any dependencies, so just # The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile # store a dummy comment line, to avoid errors with the Makefile
@ -295,46 +276,6 @@ icc)
rm -f "$tmpdepfile" rm -f "$tmpdepfile"
;; ;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64) tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side # The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@ -347,13 +288,13 @@ tru64)
if test "$libtool" = yes; then if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a # With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to # static library. This mecanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation. # handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
# #
# With libtool 1.5 this exception was removed, and libtool now # With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two # generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and # compilations output dependencies in in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because # in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer # one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is # $dir$base.o.d over $dir.libs/$base.o.d because the latter is

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# install - install a program, script, or datafile # install - install a program, script, or datafile
scriptversion=2006-12-25.00 scriptversion=2005-05-14.22
# This originates from X11R5 (mit/util/scripts/install.sh), which was # This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the # later released in X11R6 (xc/config/util/install.sh) with the
@ -39,68 +39,38 @@ scriptversion=2006-12-25.00
# when there is no Makefile. # when there is no Makefile.
# #
# This script is compatible with the BSD install script, but was written # This script is compatible with the BSD install script, but was written
# from scratch. # from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script # set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it. # Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-} doit="${DOITPROG-}"
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path; # put in absolute paths if you don't have them in your path; or use env. vars.
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp} mvprog="${MVPROG-mv}"
chmodprog=${CHMODPROG-chmod} cpprog="${CPPROG-cp}"
chownprog=${CHOWNPROG-chown} chmodprog="${CHMODPROG-chmod}"
cmpprog=${CMPPROG-cmp} chownprog="${CHOWNPROG-chown}"
cpprog=${CPPROG-cp} chgrpprog="${CHGRPPROG-chgrp}"
mkdirprog=${MKDIRPROG-mkdir} stripprog="${STRIPPROG-strip}"
mvprog=${MVPROG-mv} rmprog="${RMPROG-rm}"
rmprog=${RMPROG-rm} mkdirprog="${MKDIRPROG-mkdir}"
stripprog=${STRIPPROG-strip}
posix_glob='?' chmodcmd="$chmodprog 0755"
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd= chowncmd=
mvcmd=$mvprog chgrpcmd=
rmcmd="$rmprog -f"
stripcmd= stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src= src=
dst= dst=
dir_arg= dir_arg=
dst_arg= dstarg=
copy_on_change=false
no_target_directory= no_target_directory=
usage="\ usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES... or: $0 [OPTION]... -d DIRECTORIES...
@ -110,86 +80,81 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES. In the 4th, create DIRECTORIES.
Options: Options:
--help display this help and exit. -c (ignored)
--version display version info and exit. -d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-c (ignored) -m MODE $chmodprog installed files to MODE.
-C install only if different (preserve the last data modification time) -o USER $chownprog installed files to USER.
-d create directories instead of installing files. -s $stripprog installed files.
-g GROUP $chgrpprog installed files to GROUP. -t DIRECTORY install into DIRECTORY.
-m MODE $chmodprog installed files to MODE. -T report an error if DSTFILE is a directory.
-o USER $chownprog installed files to USER. --help display this help and exit.
-s $stripprog installed files. --version display version info and exit.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands: Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
RMPROG STRIPPROG
" "
while test $# -ne 0; do while test -n "$1"; do
case $1 in case $1 in
-c) ;; -c) shift
continue;;
-C) copy_on_change=true;; -d) dir_arg=true
shift
-d) dir_arg=true;; continue;;
-g) chgrpcmd="$chgrpprog $2" -g) chgrpcmd="$chgrpprog $2"
shift;; shift
shift
continue;;
--help) echo "$usage"; exit $?;; --help) echo "$usage"; exit $?;;
-m) mode=$2 -m) chmodcmd="$chmodprog $2"
case $mode in shift
*' '* | *' '* | *' shift
'* | *'*'* | *'?'* | *'['*) continue;;
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2" -o) chowncmd="$chownprog $2"
shift;; shift
shift
continue;;
-s) stripcmd=$stripprog;; -s) stripcmd=$stripprog
shift
continue;;
-t) dst_arg=$2 -t) dstarg=$2
shift;; shift
shift
continue;;
-T) no_target_directory=true;; -T) no_target_directory=true
shift
continue;;
--version) echo "$0 $scriptversion"; exit $?;; --version) echo "$0 $scriptversion"; exit $?;;
--) shift *) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
break;; break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac esac
shift
done done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then if test -z "$1"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2 echo "$0: no input file specified." >&2
exit 1 exit 1
@ -199,47 +164,24 @@ if test $# -eq 0; then
exit 0 exit 0
fi fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src for src
do do
# Protect names starting with `-'. # Protect names starting with `-'.
case $src in case $src in
-*) src=./$src;; -*) src=./$src ;;
esac esac
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
dst=$src dst=$src
dstdir=$dst src=
test -d "$dstdir"
dstdir_status=$?
else
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad # might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'. # if $src (and thus $dsttmp) contains '*'.
@ -248,199 +190,71 @@ do
exit 1 exit 1
fi fi
if test -z "$dst_arg"; then if test -z "$dstarg"; then
echo "$0: no destination specified." >&2 echo "$0: no destination specified." >&2
exit 1 exit 1
fi fi
dst=$dst_arg dst=$dstarg
# Protect names starting with `-'. # Protect names starting with `-'.
case $dst in case $dst in
-*) dst=./$dst;; -*) dst=./$dst ;;
esac esac
# If destination is a directory, append the input filename; won't work # If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored. # if double slashes aren't ignored.
if test -d "$dst"; then if test -d "$dst"; then
if test -n "$no_target_directory"; then if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2 echo "$0: $dstarg: Is a directory" >&2
exit 1 exit 1
fi fi
dstdir=$dst dst=$dst/`basename "$src"`
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi fi
fi fi
obsolete_mkdir_used=false # This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
if test $dstdir_status != 0; then # Make sure that the destination directory exists.
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7]) # Skip lots of stat calls in the usual case.
mkdir_umask=`expr $umask + 22 \ if test ! -d "$dstdir"; then
- $umask % 100 % 40 + $umask % 20 \ defaultIFS='
- $umask % 10 % 4 + $umask % 2 '
`;; IFS="${IFS-$defaultIFS}"
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode. oIFS=$IFS
# Otherwise, rely on $mkdir_umask. # Some sh's can't handle IFS=/ for some reason.
if test -n "$dir_arg"; then IFS='%'
mkdir_mode=-m$mode set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
else shift
mkdir_mode= IFS=$oIFS
fi
posix_mkdir=false pathcomp=
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask && while test $# -ne 0 ; do
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 pathcomp=$pathcomp$1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift shift
$posix_glob set +f if test ! -d "$pathcomp"; then
IFS=$oIFS $mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
prefixes= # install-sh are creating the directory concurrently. This
# is OK.
for d test -d "$pathcomp" || exit
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi fi
fi pathcomp=$pathcomp/
done
fi fi
if test -n "$dir_arg"; then if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } && $doit $mkdircmd "$dst" \
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
else else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory. # Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_ dsttmp=$dstdir/_inst.$$_
@ -448,9 +262,10 @@ do
# Trap to clean up those temp files at exit. # Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name. # Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && $doit $cpprog "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits. # and set any options; do chmod last to preserve setuid bits.
# #
@ -458,59 +273,48 @@ do
# ignore errors from any of these, just make sure not to ignore # ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command. # errors from the above "$doit $cpprog $src $dsttmp" command.
# #
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file. # Now rename the file to the real destination.
if $copy_on_change && { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && || {
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && # The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
eval "$initialize_posix_glob" && # Now remove or move aside any old file at destination location.
$posix_glob set -f && # We try this two ways since rm can't unlink itself on some
set X $old && old=:$2:$4:$5:$6 && # systems and the destination file might be busy for other
set X $new && new=:$2:$4:$5:$6 && # reasons. In this case, the final cleanup might fail but the new
$posix_glob set +f && # file should still install successfully.
{
if test -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 1
}
else
:
fi
} &&
test "$old" = "$new" && # Now rename the file to the real destination.
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
then }
rm -f "$dsttmp" }
else fi || { (exit 1); exit 1; }
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# 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.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables: # Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp) # eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion=" # time-stamp-start: "scriptversion="

View File

@ -1,9 +1,9 @@
#! /bin/sh #! /bin/sh
# Common stub for a few missing GNU programs while installing. # Common stub for a few missing GNU programs while installing.
scriptversion=2006-05-10.23 scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@ -33,8 +33,6 @@ if test $# -eq 0; then
fi fi
run=: run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the # In the cases where this matters, `missing' is being run in the
# srcdir already. # srcdir already.
@ -46,7 +44,7 @@ fi
msg="missing on your system" msg="missing on your system"
case $1 in case "$1" in
--run) --run)
# Try to run requested program, and just exit if it succeeds. # Try to run requested program, and just exit if it succeeds.
run= run=
@ -79,7 +77,6 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4' aclocal touch file \`aclocal.m4'
autoconf touch file \`configure' autoconf touch file \`configure'
autoheader touch file \`config.h.in' autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch] bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c flex create \`lex.yy.c', if possible, from existing .c
@ -109,7 +106,7 @@ esac
# Now exit if we have it, but it failed. Also exit now if we # Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect # don't have it and --version was passed (most likely to detect
# the program). # the program).
case $1 in case "$1" in
lex|yacc) lex|yacc)
# Not GNU programs, they don't have --version. # Not GNU programs, they don't have --version.
;; ;;
@ -138,7 +135,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version), # If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it. # try to emulate it.
case $1 in case "$1" in
aclocal*) aclocal*)
echo 1>&2 "\ echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if WARNING: \`$1' is $msg. You should only need it if
@ -167,7 +164,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h" test -z "$files" && files="config.h"
touch_files= touch_files=
for f in $files; do for f in $files; do
case $f in case "$f" in
*:*) touch_files="$touch_files "`echo "$f" | *:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;; sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";; *) touch_files="$touch_files $f.in";;
@ -195,8 +192,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU You can get \`$1' as part of \`Autoconf' from any GNU
archive site." archive site."
file=`echo "$*" | sed -n "$sed_output"` file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then if test -f "$file"; then
touch $file touch $file
else else
@ -217,25 +214,25 @@ WARNING: \`$1' $msg. You should only need it if
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site." \`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h rm -f y.tab.c y.tab.h
if test $# -ne 1; then if [ $# -ne 1 ]; then
eval LASTARG="\${$#}" eval LASTARG="\${$#}"
case $LASTARG in case "$LASTARG" in
*.y) *.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if test -f "$SRCFILE"; then if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c cp "$SRCFILE" y.tab.c
fi fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if test -f "$SRCFILE"; then if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h cp "$SRCFILE" y.tab.h
fi fi
;; ;;
esac esac
fi fi
if test ! -f y.tab.h; then if [ ! -f y.tab.h ]; then
echo >y.tab.h echo >y.tab.h
fi fi
if test ! -f y.tab.c; then if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c echo 'main() { return 0; }' >y.tab.c
fi fi
;; ;;
@ -247,18 +244,18 @@ WARNING: \`$1' is $msg. You should only need it if
in order for those modifications to take effect. You can get in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site." \`Flex' from any GNU archive site."
rm -f lex.yy.c rm -f lex.yy.c
if test $# -ne 1; then if [ $# -ne 1 ]; then
eval LASTARG="\${$#}" eval LASTARG="\${$#}"
case $LASTARG in case "$LASTARG" in
*.l) *.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if test -f "$SRCFILE"; then if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c cp "$SRCFILE" lex.yy.c
fi fi
;; ;;
esac esac
fi fi
if test ! -f lex.yy.c; then if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c echo 'main() { return 0; }' >lex.yy.c
fi fi
;; ;;
@ -270,9 +267,11 @@ WARNING: \`$1' is $msg. You should only need it if
\`Help2man' package in order for those modifications to take \`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site." effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n "$sed_output"` file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then
if test -f "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file touch $file
else else
test -z "$file" || exec >$file test -z "$file" || exec >$file
@ -290,17 +289,11 @@ WARNING: \`$1' is $msg. You should only need it if
DU, IRIX). You might want to install the \`Texinfo' package or DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site." the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ... # The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"` file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then if test -z "$file"; then
# ... or it is the one specified with @setfilename ... # ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n ' file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info) # ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi fi
@ -324,13 +317,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi fi
firstarg="$1" firstarg="$1"
if shift; then if shift; then
case $firstarg in case "$firstarg" in
*o*) *o*)
firstarg=`echo "$firstarg" | sed s/o//` firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0 tar "$firstarg" "$@" && exit 0
;; ;;
esac esac
case $firstarg in case "$firstarg" in
*h*) *h*)
firstarg=`echo "$firstarg" | sed s/h//` firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0 tar "$firstarg" "$@" && exit 0