145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org#! /bin/sh 245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# Common stub for a few missing GNU programs while installing. 345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 4a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.orgscriptversion=2009-04-28.21; # UTC 545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 6a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 7a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# 2008, 2009 Free Software Foundation, Inc. 845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. 945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 1045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# This program is free software; you can redistribute it and/or modify 1145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# it under the terms of the GNU General Public License as published by 1245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# the Free Software Foundation; either version 2, or (at your option) 1345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# any later version. 1445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 1545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# This program is distributed in the hope that it will be useful, 1645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# but WITHOUT ANY WARRANTY; without even the implied warranty of 1745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# GNU General Public License for more details. 1945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 2045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# You should have received a copy of the GNU General Public License 21a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# along with this program. If not, see <http://www.gnu.org/licenses/>. 2245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 2345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# As a special exception to the GNU General Public License, if you 2445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# distribute this file as part of a program that contains a 2545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# configuration script generated by Autoconf, you may include it under 2645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# the same distribution terms that you use for the rest of that program. 2745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 2845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgif test $# -eq 0; then 2945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "Try \`$0 --help' for more information" 3045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 3145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgfi 3245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 3345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgrun=: 3445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgsed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' 3545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgsed_minuso='s/.* -o \([^ ]*\).*/\1/p' 3645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 3745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# In the cases where this matters, `missing' is being run in the 3845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# srcdir already. 3945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgif test -f configure.ac; then 4045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org configure_ac=configure.ac 4145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgelse 4245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org configure_ac=configure.in 4345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgfi 4445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 4545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgmsg="missing on your system" 4645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 4745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgcase $1 in 4845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org--run) 4945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # Try to run requested program, and just exit if it succeeds. 5045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org run= 5145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org shift 5245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org "$@" && exit 0 5345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # Exit code 63 means version mismatch. This often happens 5445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # when the user try to use an ancient version of a tool on 5545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # a file that requires a minimum version. In this case we 5645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # we should proceed has if the program had been absent, or 5745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # if --run hadn't been passed. 5845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test $? = 63; then 5945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org run=: 6045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org msg="probably too old" 6145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 6245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 6345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 6445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org -h|--h|--he|--hel|--help) 6545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo "\ 6645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org$0 [OPTION]... PROGRAM [ARGUMENT]... 6745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 6845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgHandle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an 6945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgerror status if there is no known handling for PROGRAM. 7045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 7145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgOptions: 7245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org -h, --help display this help and exit 7345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org -v, --version output version information and exit 7445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org --run try to run the given command, and emulate it if it fails 7545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 7645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgSupported PROGRAM values: 7745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org aclocal touch file \`aclocal.m4' 7845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org autoconf touch file \`configure' 7945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org autoheader touch file \`config.h.in' 8045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org autom4te touch the output file, or create a stub one 8145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org automake touch all \`Makefile.in' files 8245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org bison create \`y.tab.[ch]', if possible, from existing .[ch] 8345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org flex create \`lex.yy.c', if possible, from existing .c 8445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org help2man touch the output file 8545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org lex create \`lex.yy.c', if possible, from existing .c 8645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org makeinfo touch the output file 8745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org tar try tar, gnutar, gtar, then tar without non-portable flags 8845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org yacc create \`y.tab.[ch]', if possible, from existing .[ch] 8945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 90a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.orgVersion suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and 91a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org\`g' are ignored when checking the name. 92a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org 9345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgSend bug reports to <bug-automake@gnu.org>." 9445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit $? 9545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 9645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 9745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 9845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo "missing $scriptversion (GNU Automake)" 9945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit $? 10045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 10145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 10245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org -*) 10345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "$0: Unknown \`$1' option" 10445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "Try \`$0 --help' for more information" 10545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 10645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 10745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 10845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgesac 10945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 110a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# normalize program name to check for. 111a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.orgprogram=`echo "$1" | sed ' 112a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org s/^gnu-//; t 113a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org s/^gnu//; t 114a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org s/^g//; t'` 115a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org 11645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# Now exit if we have it, but it failed. Also exit now if we 11745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# don't have it and --version was passed (most likely to detect 118a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# the program). This is about non-GNU programs, so use $1 not 119a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# $program. 12045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgcase $1 in 121a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org lex*|yacc*) 12245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # Not GNU programs, they don't have --version. 12345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 12445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 125a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org tar*) 12645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -n "$run"; then 12745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "ERROR: \`tar' requires --run" 12845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 12945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 13045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 13145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 13245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 13345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 13445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *) 13545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -z "$run" && ($1 --version) > /dev/null 2>&1; then 13645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # We have it, but it failed. 13745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 13845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org elif test "x$2" = "x--version" || test "x$2" = "x--help"; then 13945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # Could not run --version or --help. This is probably someone 14045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # running `$TOOL --version' or `$TOOL --help' to check whether 14145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # $TOOL exists and not knowing $TOOL uses missing. 14245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 14345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 14445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 14545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgesac 14645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 14745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# If it does not exist, or fails to run (possibly an outdated version), 14845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# try to emulate it. 149a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.orgcase $program in 15045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org aclocal*) 15145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 15245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 15345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified \`acinclude.m4' or \`${configure_ac}'. You might want 15445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org to install the \`Automake' and \`Perl' packages. Grab them from 15545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org any GNU archive site." 15645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch aclocal.m4 15745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 15845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 159a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org autoconf*) 16045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 16145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 16245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified \`${configure_ac}'. You might want to install the 16345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org \`Autoconf' and \`GNU m4' packages. Grab them from any GNU 16445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org archive site." 16545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch configure 16645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 16745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 168a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org autoheader*) 16945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 17045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 17145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified \`acconfig.h' or \`${configure_ac}'. You might want 17245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org to install the \`Autoconf' and \`GNU m4' packages. Grab them 17345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org from any GNU archive site." 17445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` 17545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$files" && files="config.h" 17645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch_files= 17745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org for f in $files; do 17845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org case $f in 17945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *:*) touch_files="$touch_files "`echo "$f" | 18045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org sed -e 's/^[^:]*://' -e 's/:.*//'`;; 18145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *) touch_files="$touch_files $f.in";; 18245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org esac 18345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org done 18445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch $touch_files 18545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 18645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 18745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org automake*) 18845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 18945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 19045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. 19145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org You might want to install the \`Automake' and \`Perl' packages. 19245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org Grab them from any GNU archive site." 19345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org find . -type f -name Makefile.am -print | 19445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org sed 's/\.am$/.in/' | 19545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org while read f; do touch "$f"; done 19645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 19745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 198a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org autom4te*) 19945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 20045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is needed, but is $msg. 20145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org You might have modified some files without having the 20245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org proper tools for further handling them. 20345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org You can get \`$1' as part of \`Autoconf' from any GNU 20445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org archive site." 20545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 20645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org file=`echo "$*" | sed -n "$sed_output"` 20745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 20845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -f "$file"; then 20945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch $file 21045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org else 21145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$file" || exec >$file 21245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo "#! /bin/sh" 21345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo "# Created by GNU Automake missing as a replacement of" 21445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo "# $ $@" 21545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo "exit 0" 21645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org chmod +x $file 21745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 21845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 21945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 22045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 221a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org bison*|yacc*) 22245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 22345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' $msg. You should only need it if 22445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified a \`.y' file. You may need the \`Bison' package 22545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org in order for those modifications to take effect. You can get 22645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org \`Bison' from any GNU archive site." 22745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org rm -f y.tab.c y.tab.h 22845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test $# -ne 1; then 22945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org eval LASTARG="\${$#}" 23045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org case $LASTARG in 23145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *.y) 23245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` 23345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -f "$SRCFILE"; then 23445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org cp "$SRCFILE" y.tab.c 23545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 23645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` 23745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -f "$SRCFILE"; then 23845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org cp "$SRCFILE" y.tab.h 23945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 24045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 24145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org esac 24245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 24345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test ! -f y.tab.h; then 24445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo >y.tab.h 24545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 24645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test ! -f y.tab.c; then 24745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 'main() { return 0; }' >y.tab.c 24845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 24945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 25045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 251a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org lex*|flex*) 25245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 25345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 25445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified a \`.l' file. You may need the \`Flex' package 25545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org in order for those modifications to take effect. You can get 25645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org \`Flex' from any GNU archive site." 25745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org rm -f lex.yy.c 25845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test $# -ne 1; then 25945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org eval LASTARG="\${$#}" 26045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org case $LASTARG in 26145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *.l) 26245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` 26345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -f "$SRCFILE"; then 26445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org cp "$SRCFILE" lex.yy.c 26545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 26645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 26745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org esac 26845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 26945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test ! -f lex.yy.c; then 27045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 'main() { return 0; }' >lex.yy.c 27145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 27245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 27345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 274a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org help2man*) 27545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 27645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 27745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified a dependency of a manual page. You may need the 27845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org \`Help2man' package in order for those modifications to take 27945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org effect. You can get \`Help2man' from any GNU archive site." 28045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 28145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org file=`echo "$*" | sed -n "$sed_output"` 28245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 28345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -f "$file"; then 28445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch $file 28545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org else 28645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$file" || exec >$file 28745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo ".ab help2man is required to generate this page" 288a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org exit $? 28945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 29045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 29145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 292a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org makeinfo*) 29345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 29445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is $msg. You should only need it if 29545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org you modified a \`.texi' or \`.texinfo' file, or any other file 29645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org indirectly affecting the aspect of the manual. The spurious 29745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org call might also be the consequence of using a buggy \`make' (AIX, 29845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org DU, IRIX). You might want to install the \`Texinfo' package or 29945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org the \`GNU make' package. Grab either from any GNU archive site." 30045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # The file to touch is that specified with -o ... 30145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org file=`echo "$*" | sed -n "$sed_output"` 30245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 30345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if test -z "$file"; then 30445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # ... or it is the one specified with @setfilename ... 30545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` 30645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org file=`sed -n ' 30745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org /^@setfilename/{ 30845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org s/.* \([^ ]*\) *$/\1/ 30945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org p 31045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org q 31145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org }' $infile` 31245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # ... or it is derived from the source name (dir/f.texi becomes f.info) 31345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info 31445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 31545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # If the file does not exist, the user really needs makeinfo; 31645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # let's fail without touching anything. 31745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org test -f $file || exit 1 31845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org touch $file 31945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 32045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 321a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org tar*) 32245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org shift 32345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 32445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # We have already tried tar in the generic part. 32545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # Look for gnutar/gtar before invocation to avoid ugly error 32645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org # messages. 32745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if (gnutar --version > /dev/null 2>&1); then 32845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org gnutar "$@" && exit 0 32945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 33045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if (gtar --version > /dev/null 2>&1); then 33145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org gtar "$@" && exit 0 33245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 33345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org firstarg="$1" 33445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org if shift; then 33545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org case $firstarg in 33645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *o*) 33745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org firstarg=`echo "$firstarg" | sed s/o//` 33845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org tar "$firstarg" "$@" && exit 0 33945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 34045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org esac 34145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org case $firstarg in 34245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *h*) 34345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org firstarg=`echo "$firstarg" | sed s/h//` 34445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org tar "$firstarg" "$@" && exit 0 34545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 34645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org esac 34745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org fi 34845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 34945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 35045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: I can't seem to be able to run \`tar' with the given arguments. 35145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org You may want to install GNU tar or Free paxutils, or check the 35245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org command line arguments." 35345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 35445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 35545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 35645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org *) 35745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org echo 1>&2 "\ 35845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgWARNING: \`$1' is needed, and is $msg. 35945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org You might have modified some files without having the 36045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org proper tools for further handling them. Check the \`README' file, 36145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org it often tells you about the needed prerequisites for installing 36245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org this package. You may also peek at any GNU archive site, in case 36345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org some other package would contain this missing \`$1' program." 36445afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org exit 1 36545afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org ;; 36645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgesac 36745afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 36845afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.orgexit 0 36945afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org 37045afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# Local variables: 37145afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# eval: (add-hook 'write-file-hooks 'time-stamp) 37245afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# time-stamp-start: "scriptversion=" 37345afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# time-stamp-format: "%:y-%02m-%02d.%02H" 374a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# time-stamp-time-zone: "UTC" 375a1b5233e6d340f45f4846131fec9d0b92e203ce4hbono@chromium.org# time-stamp-end: "; # UTC" 37645afe016bed87b9c6946184709058b39ede3f77ajwong@chromium.org# End: 377