missing revision 1.1 1 1.1 elric #! /bin/sh
2 1.1 elric # Common stub for a few missing GNU programs while installing.
3 1.1 elric # Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4 1.1 elric # Franc,ois Pinard <pinard (at] iro.umontreal.ca>, 1996.
5 1.1 elric
6 1.1 elric # This program is free software; you can redistribute it and/or modify
7 1.1 elric # it under the terms of the GNU General Public License as published by
8 1.1 elric # the Free Software Foundation; either version 2, or (at your option)
9 1.1 elric # any later version.
10 1.1 elric
11 1.1 elric # This program is distributed in the hope that it will be useful,
12 1.1 elric # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 1.1 elric # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 1.1 elric # GNU General Public License for more details.
15 1.1 elric
16 1.1 elric # You should have received a copy of the GNU General Public License
17 1.1 elric # along with this program; if not, write to the Free Software
18 1.1 elric # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 1.1 elric # 02111-1307, USA.
20 1.1 elric
21 1.1 elric if test $# -eq 0; then
22 1.1 elric echo 1>&2 "Try \`$0 --help' for more information"
23 1.1 elric exit 1
24 1.1 elric fi
25 1.1 elric
26 1.1 elric case "$1" in
27 1.1 elric
28 1.1 elric -h|--h|--he|--hel|--help)
29 1.1 elric echo "\
30 1.1 elric $0 [OPTION]... PROGRAM [ARGUMENT]...
31 1.1 elric
32 1.1 elric Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
33 1.1 elric error status if there is no known handling for PROGRAM.
34 1.1 elric
35 1.1 elric Options:
36 1.1 elric -h, --help display this help and exit
37 1.1 elric -v, --version output version information and exit
38 1.1 elric
39 1.1 elric Supported PROGRAM values:
40 1.1 elric aclocal touch file \`aclocal.m4'
41 1.1 elric autoconf touch file \`configure'
42 1.1 elric autoheader touch file \`config.h.in'
43 1.1 elric automake touch all \`Makefile.in' files
44 1.1 elric bison create \`y.tab.[ch]', if possible, from existing .[ch]
45 1.1 elric flex create \`lex.yy.c', if possible, from existing .c
46 1.1 elric lex create \`lex.yy.c', if possible, from existing .c
47 1.1 elric makeinfo touch the output file
48 1.1 elric yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
49 1.1 elric ;;
50 1.1 elric
51 1.1 elric -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
52 1.1 elric echo "missing - GNU libit 0.0"
53 1.1 elric ;;
54 1.1 elric
55 1.1 elric -*)
56 1.1 elric echo 1>&2 "$0: Unknown \`$1' option"
57 1.1 elric echo 1>&2 "Try \`$0 --help' for more information"
58 1.1 elric exit 1
59 1.1 elric ;;
60 1.1 elric
61 1.1 elric aclocal)
62 1.1 elric echo 1>&2 "\
63 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
64 1.1 elric you modified \`acinclude.m4' or \`configure.in'. You might want
65 1.1 elric to install the \`Automake' and \`Perl' packages. Grab them from
66 1.1 elric any GNU archive site."
67 1.1 elric touch aclocal.m4
68 1.1 elric ;;
69 1.1 elric
70 1.1 elric autoconf)
71 1.1 elric echo 1>&2 "\
72 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
73 1.1 elric you modified \`configure.in'. You might want to install the
74 1.1 elric \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
75 1.1 elric archive site."
76 1.1 elric touch configure
77 1.1 elric ;;
78 1.1 elric
79 1.1 elric autoheader)
80 1.1 elric echo 1>&2 "\
81 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
82 1.1 elric you modified \`acconfig.h' or \`configure.in'. You might want
83 1.1 elric to install the \`Autoconf' and \`GNU m4' packages. Grab them
84 1.1 elric from any GNU archive site."
85 1.1 elric files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
86 1.1 elric test -z "$files" && files="config.h"
87 1.1 elric touch_files=
88 1.1 elric for f in $files; do
89 1.1 elric case "$f" in
90 1.1 elric *:*) touch_files="$touch_files "`echo "$f" |
91 1.1 elric sed -e 's/^[^:]*://' -e 's/:.*//'`;;
92 1.1 elric *) touch_files="$touch_files $f.in";;
93 1.1 elric esac
94 1.1 elric done
95 1.1 elric touch $touch_files
96 1.1 elric ;;
97 1.1 elric
98 1.1 elric automake)
99 1.1 elric echo 1>&2 "\
100 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
101 1.1 elric you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
102 1.1 elric You might want to install the \`Automake' and \`Perl' packages.
103 1.1 elric Grab them from any GNU archive site."
104 1.1 elric find . -type f -name Makefile.am -print |
105 1.1 elric sed 's/\.am$/.in/' |
106 1.1 elric while read f; do touch "$f"; done
107 1.1 elric ;;
108 1.1 elric
109 1.1 elric bison|yacc)
110 1.1 elric echo 1>&2 "\
111 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
112 1.1 elric you modified a \`.y' file. You may need the \`Bison' package
113 1.1 elric in order for those modifications to take effect. You can get
114 1.1 elric \`Bison' from any GNU archive site."
115 1.1 elric rm -f y.tab.c y.tab.h
116 1.1 elric if [ $# -ne 1 ]; then
117 1.1 elric eval LASTARG="\${$#}"
118 1.1 elric case "$LASTARG" in
119 1.1 elric *.y)
120 1.1 elric SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
121 1.1 elric if [ -f "$SRCFILE" ]; then
122 1.1 elric cp "$SRCFILE" y.tab.c
123 1.1 elric fi
124 1.1 elric SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
125 1.1 elric if [ -f "$SRCFILE" ]; then
126 1.1 elric cp "$SRCFILE" y.tab.h
127 1.1 elric fi
128 1.1 elric ;;
129 1.1 elric esac
130 1.1 elric fi
131 1.1 elric if [ ! -f y.tab.h ]; then
132 1.1 elric echo >y.tab.h
133 1.1 elric fi
134 1.1 elric if [ ! -f y.tab.c ]; then
135 1.1 elric echo 'main() { return 0; }' >y.tab.c
136 1.1 elric fi
137 1.1 elric ;;
138 1.1 elric
139 1.1 elric lex|flex)
140 1.1 elric echo 1>&2 "\
141 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
142 1.1 elric you modified a \`.l' file. You may need the \`Flex' package
143 1.1 elric in order for those modifications to take effect. You can get
144 1.1 elric \`Flex' from any GNU archive site."
145 1.1 elric rm -f lex.yy.c
146 1.1 elric if [ $# -ne 1 ]; then
147 1.1 elric eval LASTARG="\${$#}"
148 1.1 elric case "$LASTARG" in
149 1.1 elric *.l)
150 1.1 elric SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
151 1.1 elric if [ -f "$SRCFILE" ]; then
152 1.1 elric cp "$SRCFILE" lex.yy.c
153 1.1 elric fi
154 1.1 elric ;;
155 1.1 elric esac
156 1.1 elric fi
157 1.1 elric if [ ! -f lex.yy.c ]; then
158 1.1 elric echo 'main() { return 0; }' >lex.yy.c
159 1.1 elric fi
160 1.1 elric ;;
161 1.1 elric
162 1.1 elric makeinfo)
163 1.1 elric echo 1>&2 "\
164 1.1 elric WARNING: \`$1' is missing on your system. You should only need it if
165 1.1 elric you modified a \`.texi' or \`.texinfo' file, or any other file
166 1.1 elric indirectly affecting the aspect of the manual. The spurious
167 1.1 elric call might also be the consequence of using a buggy \`make' (AIX,
168 1.1 elric DU, IRIX). You might want to install the \`Texinfo' package or
169 1.1 elric the \`GNU make' package. Grab either from any GNU archive site."
170 1.1 elric file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
171 1.1 elric if test -z "$file"; then
172 1.1 elric file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
173 1.1 elric file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
174 1.1 elric fi
175 1.1 elric touch $file
176 1.1 elric ;;
177 1.1 elric
178 1.1 elric *)
179 1.1 elric echo 1>&2 "\
180 1.1 elric WARNING: \`$1' is needed, and you do not seem to have it handy on your
181 1.1 elric system. You might have modified some files without having the
182 1.1 elric proper tools for further handling them. Check the \`README' file,
183 1.1 elric it often tells you about the needed prerequirements for installing
184 1.1 elric this package. You may also peek at any GNU archive site, in case
185 1.1 elric some other package would contain this missing \`$1' program."
186 1.1 elric exit 1
187 1.1 elric ;;
188 1.1 elric esac
189 1.1 elric
190 1.1 elric exit 0
191