Remove unused methods
[xapian.git] / bootstrap
blob59dd18201767ec6fc2ac78d0525104e821c389d6
1 #!/bin/sh
2 # bootstrap a xapian source tree obtained from git to produce a tree like
3 # you'd get from unpacking the results of "make dist"
5 # Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Olly Betts
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of the
10 # License, or (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
20 # USA
22 if [ "$1" = "--help" ] ; then
23 cat <<__END__
24 $0 [--ftp] [--without-autotools|--clean] [MODULE...]
26 The default is to bootstrap all known modules. Any modules which have a
27 file called ".nobootstrap" in their top-level will be skipped.
28 __END__
29 exit 0
32 trap 'echo "Bootstrap failed"' EXIT
33 set -e
35 # The variables which specify the autotools to use.
36 autotools="AUTORECONF AUTOCONF AUTOHEADER AUTOM4TE AUTOMAKE ACLOCAL LIBTOOLIZE"
38 # Tool for downloading a file from a URL (currently wget or curl).
39 FETCH_URL_TOOL=
41 check_sha1sum() {
42 checksum=$1
43 tarball=$2
45 if [ -z "$SHA1SUM_TOOL" ] ; then
46 for SHA1SUM_TOOL in \
47 '${SHA1SUM-sha1sum} 2>/dev/null|cut -d\ -f1' \
48 '${SHASUM-shasum} 2>/dev/null|cut -d\ -f1' \
49 '$(OPENSSL-openssl} sha1 2>/dev/null|sed "s/.* //"' \
50 '' ; do
51 if [ -z "$SHA1SUM_TOOL" ] ; then
52 echo <<'END'
53 Need sha1sum or shasum or openssl installed to check SHA1 checksums.
54 Set environment variable SHA1SUM, SHASUM or OPENSSL if the tool isn't on
55 your PATH.
56 END
57 exit 1
59 r=`:|eval "$SHA1SUM_TOOL"`
60 [ X"$r" != Xda39a3ee5e6b4b0d3255bfef95601890afd80709 ] || break
61 done
63 r=`< $tarball eval "$SHA1SUM_TOOL"`
64 if [ X"$r" != X"$checksum" ] ; then
65 echo "$tarball: computed SHA1 checksum did NOT match"
66 echo "computed: $r with $SHA1SUM_TOOL"
67 echo "expected: $checksum"
68 ls -l $tarball
69 file $tarball || true
70 mv "$tarball" "$tarball.$r"
71 echo "Renamed $tarball to $tarball.$r"
72 exit 1
76 lazy_build() {
77 package=$1
78 basename=$package-$2
79 ext=$3
80 checksum=$4
81 if [ "$ext" = "tar.xz" ] ; then
82 if [ -z "$xz_ok" ] ; then
83 if ${XZ-xz} --version > /dev/null 2>&1 ; then
84 xz_ok=1
85 else
86 xz_ok=0
89 if [ "$xz_ok" = 0 ] ; then
90 shift 2
91 ext=$3
92 checksum=$4
95 if [ "$ext" = "tar.bz2" ] ; then
96 if [ -z "$bz2_ok" ] ; then
97 # bzip2 --version doesn't exit with code 0 in upstream version (though
98 # Debian at least patch this bug), so use --help to check it.
99 if bzip2 --help > /dev/null 2>&1 ; then
100 bz2_ok=1
101 else
102 bz2_ok=0
105 if [ "$bz2_ok" = 0 ] ; then
106 shift 2
107 ext=$3
108 checksum=$4
111 tarball=$basename.$ext
112 case $basename in
113 *[24680][a-z]) basename=`echo "$basename"|sed 's/[a-z]$//'` ;;
114 esac
116 # Create the stamp file in INST so that rerunning bootstrap after
117 # "rm -rf INST" recovers nicely.
118 stamp=../INST/$package.stamp
120 # Download the tarball if required.
121 if [ ! -f "$tarball" ] ; then
122 if [ -z "$FETCH_URL_TOOL" ] ; then
123 if ${WGET-wget} --version > /dev/null 2>&1 ; then
124 FETCH_URL_TOOL="${WGET-wget} -O-"
125 elif ${CURL-curl} --version > /dev/null 2>&1 || [ "$?" = 2 ] ; then
126 # curl --version exits with code 2.
127 # -L is needed to follow HTTP redirects.
128 FETCH_URL_TOOL="${CURL-curl} -L"
129 elif ${LWP_REQUEST-lwp-request} -v > /dev/null 2>&1 || [ "$?" = 9 -o "$?" = 255 ] ; then
130 # lwp-request -v exits with code 9 (5.810) or 255 (6.03)
131 FETCH_URL_TOOL="${LWP_REQUEST-lwp-request} -mGET"
132 else
133 cat <<END >&2
134 Neither wget nor curl nor lwp-request found - install one of them or if already
135 installed, set WGET, CURL or LWP_REQUEST to the full path. Alternatively,
136 download $url
137 to directory `pwd`
138 then rerun this script.
140 exit 1
143 case $basename in
144 file-*)
145 if [ "$use_ftp" = yes ] ; then
146 url="ftp://ftp.astron.com/pub/file/$tarball"
147 else
148 url="http://fossies.org/unix/misc/$tarball"
149 fi ;;
150 *[13579][a-z])
151 # GNU alpha release
152 if [ "$use_ftp" = yes ] ; then
153 url="ftp://alpha.gnu.org/gnu/$package/$tarball"
154 else
155 url="http://alpha.gnu.org/gnu/$package/$tarball"
156 fi ;;
158 if [ "$use_ftp" = yes ] ; then
159 url="ftp://ftp.gnu.org/gnu/$package/$tarball"
160 else
161 url="http://ftpmirror.gnu.org/$package/$tarball"
162 fi ;;
163 esac
164 rm -f download.tmp
165 echo "Downloading <$url>"
166 $FETCH_URL_TOOL "$url" > download.tmp && mv download.tmp "$tarball"
169 if [ -f "$stamp" ] ; then
170 find_stdout=`find "$tarball" ../patches/"$package"/* -newer "$stamp" -print 2> /dev/null||true`
171 else
172 find_stdout=force
175 if [ -n "$find_stdout" ] ; then
176 # Verify the tarball's checksum before building it.
177 check_sha1sum "$checksum" "$tarball"
179 # Remove tarballs of other versions.
180 for f in "$package"-* ; do
181 [ "$f" = "$tarball" ] || rm -rf "$f"
182 done
184 case $ext in
185 tar.xz)
186 ${XZ-xz} -dc "$tarball"| tar xf - ;;
187 tar.bz2)
188 bzip2 -dc "$tarball"| tar xf - ;;
190 gzip -dc "$tarball"| tar xf - ;;
191 esac
193 cd "$basename"
195 if [ ! -f "../../patches/$package/series" ] ; then
196 cat <<END >&2
197 No patch series file 'patches/$package/series' - if there are no patches,
198 this should just be an empty file.
200 exit 1
202 echo "Applying patches from $package/series"
203 sed -n 's/[ ]*\(#.*\)\?$//;/./p' "../../patches/$package/series" | \
204 while read p ; do
205 echo "Applying patch $package/$p"
206 patch -p1 < "../../patches/$package/$p"
207 done
209 if test -n "$AUTOCONF" ; then
210 ./configure --prefix "$instdir" AUTOCONF="$AUTOCONF"
211 else
212 ./configure --prefix "$instdir"
214 make
215 make install
216 cd ..
217 rm -rf "$basename"
219 touch "$stamp"
223 handle_git_external() {
224 path=$1
225 if [ ! -f "$path/.nobootstrap" ] ; then
226 rev=$2
227 url=$3
228 if [ ! -d "$path" ] ; then
229 git clone --no-checkout -- "$url" "$path"
230 elif (cd "$path" && git reflog "$rev" -- 2>/dev/null) ; then
231 : # Already have that revision locally
232 else
233 (cd "$path" && git fetch)
235 (cd "$path" && git checkout "$rev")
239 update_config() {
240 from=$1
241 to=$2
242 ts_from=`perl -ne '/^timestamp=(\W?)([-\d]+)$1/ and do {$_=$2;y/-//d;print;exit}' "$from"`
243 ts_to=`perl -ne '/^timestamp=(\W?)([-\d]+)$1/ and do {$_=$2;y/-//d;print;exit}' "$to"`
244 if [ "$ts_from" -gt "$ts_to" ] ; then
245 echo "Updating $to ($ts_to) with $from ($ts_from)"
246 # rm first in case the existing file is a symlink.
247 rm -f "$to"
248 cp "$from" "$to"
252 curdir=`pwd`
254 # cd to srcdir if we aren't already there.
255 srcdir=`echo "$0"|sed 's!/*[^/]*$!!'`
256 case $srcdir in
257 ""|.)
258 srcdir=. ;;
260 cd "$srcdir" ;;
261 esac
263 # Commit hash to pass to handle_git_external for swig.
264 swig_git_commit_hash=33c17b6d5ee325d0b537ed21f3ae949923e5af85
266 if [ ! -d .git ] ; then
267 echo "$0: No '.git' directory found - this script should be run from a"
268 echo "git repo cloned from git://git.xapian.org/xapian or a mirror of it"
269 exit 1
272 for emptydir in xapian-applications/omega/m4 xapian-bindings/m4 xapian-letor/m4 ; do
273 if test -d "$emptydir" ; then
275 else
276 parent=`echo "$emptydir"|sed 's,/[^/]*$,,'`
277 if test -d "$parent" ; then
278 mkdir "$emptydir"
281 done
283 if [ -f .git/info/exclude ] ; then
284 sed '/^\(swig\|xapian-applications\/omega\/common$\)/d' .git/info/exclude > .git/info/exclude~
285 else
286 [ -d .git/info ] || mkdir .git/info
288 cat <<END >> .git/info/exclude~
289 swig
290 xapian-applications/omega/common
291 xapian-letor/common
293 if [ -f .git/info/exclude ] &&
294 cmp -s .git/info/exclude~ .git/info/exclude ; then
295 rm .git/info/exclude~
296 else
297 mv .git/info/exclude~ .git/info/exclude
300 # If this tree is checked out from the github mirror, use the same access
301 # method for other things checked out from github (e.g. swig) so we avoid
302 # firewall issues. If there's no default remote, the git config command
303 # will exit with status 1, so ignore that failure.
304 origin_url=`git config remote.origin.url||:`
305 case $origin_url in
306 *[@/]github.com[:/]*)
307 github_base_url=`echo "X$origin_url"|sed 's/^X//;s!\([@/]github.com[:/]\).*!\1!'` ;;
309 github_base_url=https://github.com/ ;;
310 esac
311 swig_origin_url=${github_base_url}swig/swig.git
312 handle_git_external swig "$swig_git_commit_hash" "$swig_origin_url"
314 # If someone's created a directory for common, leave it be.
315 if [ -h xapian-applications/omega/common ] || \
316 [ ! -d xapian-applications/omega/common ] ; then
317 handle_git_external xapian-applications/omega/.common.git d52417d0c7389257e47ed1339fdfd2f4f57efda4 .
318 ln -sf .common.git/xapian-core/common xapian-applications/omega/common
321 # If someone's created a directory for common, leave it be.
322 if [ -h xapian-letor/common ] || [ ! -d xapian-letor/common ] ; then
323 handle_git_external xapian-letor/.common.git 3c0adf07a179083782ee6b8165a196668f0a1605 .
324 ln -sf .common.git/xapian-core/common xapian-letor/common
327 # Prefer http downloads as they are more likely to work through firewalls.
328 use_ftp=no
329 if [ "$1" = "--ftp" ] ; then
330 shift
331 use_ftp=yes
334 if [ "$1" = "--without-autotools" ] ; then
335 shift
336 else
337 if [ "$1" = "--clean" ] ; then
338 shift
339 rm -rf INST
342 [ -d INST ] || mkdir INST
343 instdir=`pwd`/INST
345 [ -d BUILD ] || mkdir BUILD
346 cd BUILD
348 # The last field is the SHA1 checksum of the tarball.
349 lazy_build autoconf 2.68 \
350 tar.xz 63a3b495400c1c053f2f6b62efb7a5c0ad4156c9 \
351 tar.bz2 b534c293b22048c022b1ff3a372b9c03f26170b4 \
352 tar.gz 843f7dfcc6addf129dc2c8b12f7d72d371478f42
353 # 2.69 is fussy about the m4 version
354 # lazy_build autoconf 2.69 tar.gz 562471cbcb0dd0fa42a76665acf0dbb68479b78a
355 AUTOCONF=$instdir/bin/autoconf \
356 lazy_build automake 1.15 \
357 tar.xz c279b35ca6c410809dac8ade143b805fb48b7655 \
358 tar.gz b5a840c7ec4321e78fdc9472e476263fa6614ca1
359 lazy_build libtool 2.4.6 \
360 tar.xz 3e7504b832eb2dd23170c91b6af72e15b56eb94e \
361 tar.gz 25b6931265230a06f0fc2146df64c04e5ae6ec33
362 if [ "$1" = "--deps=libmagic" ] ; then
363 shift
364 lazy_build file 5.25 \
365 tar.gz fea78106dd0b7a09a61714cdbe545135563e84bd
368 for v in $autotools ; do
369 tool=`echo "$v"|tr A-Z a-z`
370 eval "$v=\"\$instdir\"/bin/$tool;export $v"
371 done
373 cd ..
376 case `${LIBTOOLIZE-libtoolize} --version` in
378 echo "${LIBTOOLIZE-libtoolize} not found"
379 exit 1 ;;
380 "libtoolize (GNU libtool) 1.4.*")
381 echo "${LIBTOOLIZE-libtoolize} is from libtool 1.4 which is too old - libtool 2.2 is required."
382 echo "If you have both installed, set LIBTOOLIZE to point to the correct version."
383 exit 1 ;;
384 "libtoolize (GNU libtool) 1.5.*")
385 echo "${LIBTOOLIZE-libtoolize} is from libtool 1.5 which is too old - libtool 2.2 is required."
386 echo "If you have both installed, set LIBTOOLIZE to point to the correct version."
387 exit 1 ;;
388 esac
390 ACLOCAL="${ACLOCAL-aclocal} -I `pwd`/xapian-core/m4-macros"
391 export ACLOCAL
393 intree_swig=no
394 modules=
395 for module in ${@:-xapian-core xapian-applications/omega swig xapian-bindings xapian-letor} ; do
396 d=$module
397 if [ -f "$d/configure.ac" -o -f "$d/configure.in" ] ; then
399 else
400 # Skip any directories we can't bootstrap.
401 continue
403 if [ -f "$d/.nobootstrap" ] ; then
404 # Report why to save head scratching when someone forgets they created
405 # a .nobootstrap file.
406 echo "Skipping '$module' due to presence of '$d/.nobootstrap'."
407 continue
409 if [ "$d" = swig ] && [ -f "xapian-bindings/.nobootstrap" ] ; then
410 # No point bootstrapping SWIG if we aren't going to use it.
411 echo "Skipping '$d' due to presence of 'xapian-bindings/.nobootstrap'."
412 continue
414 echo "Bootstrapping \`$module'"
415 [ -f "$d/preautoreconf" ] && "$d/preautoreconf"
417 # If we have a custom INSTALL file, preserve it since autoreconf insists on
418 # replacing INSTALL with "generic installation instructions" when --force
419 # is used. Be careful to replace it if autoreconf fails.
420 if [ -f "$d/INSTALL" ] ; then
421 if grep 'generic installation instructions' "$d/INSTALL" >/dev/null 2>&1 ; then
423 else
424 mv -f "$d/INSTALL" "$d/INSTALL.preserved-by-bootstrap"
428 autoreconf_rc=
429 if [ swig = "$module" ] ; then
430 # SWIG provides its own bootstrapping script.
431 curdir=`pwd`
432 cd "$d"
433 ./autogen.sh || autoreconf_rc=$?
434 cd "$curdir"
435 # Use the uninstalled wrapper for the in-tree copy of SWIG.
436 intree_swig=yes
437 else
438 # Use --install as debian's autoconf wrapper uses 2.5X if it sees it
439 # (but it doesn't check for -i).
441 # Use --force so that we update files if autoconf, automake, or libtool
442 # has been upgraded.
443 ${AUTORECONF-autoreconf} --install --force "$d" || autoreconf_rc=$?
445 if [ -f "$d/INSTALL.preserved-by-bootstrap" ] ; then
446 mv -f "$d/INSTALL.preserved-by-bootstrap" "$d/INSTALL"
448 if [ -n "$autoreconf_rc" ] ; then
449 exit $autoreconf_rc
451 for f in config.guess config.sub ; do
452 if [ -f "$d/$f" ] ; then
453 update_config "config/$f" "$d/$f"
455 done
456 modules="$modules $module"
457 done
459 # Generate the top-level configure script.
460 rm -f configure.tmp
461 cat <<'TOP_OF_CONFIGURE' > configure.tmp
462 #!/bin/sh
463 # configure each submodule in a xapian source tree
464 # Generated by Xapian top-level bootstrap script.
466 # Copyright (C) 2003,2004,2007,2008 Olly Betts
468 # This program is free software; you can redistribute it and/or
469 # modify it under the terms of the GNU General Public License as
470 # published by the Free Software Foundation; either version 2 of the
471 # License, or (at your option) any later version.
473 # This program is distributed in the hope that it will be useful,
474 # but WITHOUT ANY WARRANTY; without even the implied warranty of
475 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
476 # GNU General Public License for more details.
478 # You should have received a copy of the GNU General Public License
479 # along with this program; if not, write to the Free Software
480 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
481 # USA
483 trap 'echo "configure failed"' EXIT
484 set -e
486 # Produced escaped version of command suitable for pasting back into sh
487 cmd=$0
488 for a ; do
489 case $a in
490 *[^-A-Za-z0-9_+=:@/.,]*)
491 esc_a=`echo "$a"|sed 's!\([^-A-Za-z0-9_+=:@/.,]\)!\\\\\\1!g'`
492 cmd="$cmd $esc_a" ;;
494 cmd="$cmd $a" ;;
495 esac
496 done
498 here=`pwd`
499 TOP_OF_CONFIGURE
501 # Produce an absolute path to srcdir.
502 srcdir_abs=`pwd`
503 # This section is unquoted so we can substitute variables.
504 cat <<MIDDLE_OF_CONFIGURE >> configure.tmp
505 srcdir="$srcdir_abs"
506 modules="$modules"
507 MIDDLE_OF_CONFIGURE
509 vars=
510 if [ yes = "$intree_swig" ] ; then
511 # We want the path to SWIG to point into srcdir, which isn't known until
512 # configure-time, so we need to expand $here in configure. We can't just set
513 # SWIG here and let the case below handle it as that would escape the value
514 # such that $here didn't get expanded at all.
515 echo ': ${SWIG="$here/swig/preinst-swig"}' >> configure.tmp
516 echo "export SWIG" >> configure.tmp
517 vars=' SWIG=$here/swig/preinst-swig'
518 # Kill any existing setting of SWIG so that we don't try to handle it again
519 # below.
520 SWIG=
522 for tool in SWIG $autotools ; do
523 eval "val=\$$tool"
524 if [ -n "$val" ] ; then
525 echo ': ${'"$tool='$val'"'}' >> configure.tmp
526 echo "export $tool" >> configure.tmp
527 vars="$vars $tool='"`echo "$val"|sed 's/\(['"\\'"']\)/\\\1/g'`"'"
529 done
530 if [ -n "$vars" ] ; then
531 # $vars will always have a leading space.
532 echo "set$vars "'"$@"' >> configure.tmp
535 cat <<'END_OF_CONFIGURE' >> configure.tmp
536 dirs=
537 revdirs=
538 XAPIAN_CONFIG=$here/xapian-core/xapian-config
539 for d in $modules ; do
540 if [ "$here" = "$srcdir" ] ; then
541 configure=./configure
542 configure_from_here=$d/configure
543 else
544 configure=$srcdir/$d/configure
545 configure_from_here=$configure
547 if [ -f "$configure_from_here" ] ; then
548 if [ -d "$d" ] ; then : ; else
549 case $d in
550 xapian-applications/*) [ -d xapian-applications ] || mkdir xapian-applications ;;
551 esac
552 mkdir "$d"
554 echo "Configuring \`$d'"
555 # Use a shared config.cache for speed and to save a bit of diskspace, but
556 # don't share it with SWIG just in case it manages to probe and cache
557 # different answers (e.g. because it uses a C compiler).
558 case $d in
559 swig)
560 cd "$d" && "$configure" ${1+"$@"}
562 xapian-core)
563 cd "$d" && "$configure" --enable-maintainer-mode --disable-option-checking --cache-file="$here/config.cache" ${1+"$@"}
565 xapian-applications/omega)
566 cd "$d" && "$configure" --enable-maintainer-mode --disable-option-checking XAPIAN_CONFIG="$XAPIAN_CONFIG" CPPFLAGS="-I$srcdir/INST/include" LDFLAGS="-L$srcdir/INST/lib" ${1+"$@"}
569 cd "$d" && "$configure" --enable-maintainer-mode --disable-option-checking --cache-file="$here/config.cache" XAPIAN_CONFIG="$XAPIAN_CONFIG" ${1+"$@"}
571 esac
572 cd "$here"
573 dirs="$dirs $d"
574 revdirs="$d $revdirs"
576 done
578 rm -f Makefile.tmp
579 cat <<EOF > Makefile.tmp
580 # Makefile generated by:
581 CONFIGURE_COMMAND := $cmd
583 if [ "$srcdir" != . ] ; then
584 cat <<EOF >> Makefile.tmp
586 VPATH = $srcdir
589 targets='all install uninstall install-strip clean distclean mostlyclean maintainer-clean dist check distcheck'
590 for target in $targets ; do
591 echo
592 echo "$target:"
593 case $target in
594 uninstall|*clean)
595 # When uninstalling or cleaning, process directories in reverse order, so
596 # that we process a directory after any directories which might use it.
597 list=$revdirs ;;
599 list=$dirs ;;
600 esac
601 for d in $list ; do
602 case $d,$target in
603 swig,install*|swig,uninstall)
604 # Nothing to do with swig when installing/uninstalling.
606 swig,dist|swig,check|swig,distcheck|swig,all)
607 # Need to ensure swig is built before "make dist", "make check", etc.
608 echo " cd $d && \$(MAKE)" ;;
609 swig,mostlyclean)
610 echo " cd $d && \$(MAKE) clean" ;;
611 xapian-bindings,distcheck)
612 # FIXME: distcheck doesn't currently work for xapian-bindings because
613 # xapian-core isn't installed.
614 echo " cd $d && \$(MAKE) check && \$(MAKE) dist" ;;
616 echo " cd $d && \$(MAKE) $target" ;;
617 esac
618 done
619 case $target in
620 distclean|maintainer-clean) echo " rm -f Makefile config.cache" ;;
621 esac
622 done >> Makefile.tmp
623 cat <<EOF >> Makefile.tmp
625 recheck:
626 \$(CONFIGURE_COMMAND)
628 Makefile: $srcdir/configure
629 \$(CONFIGURE_COMMAND)
631 $srcdir/configure: \\
632 END_OF_CONFIGURE
634 : > configure.tmp2
636 # We want to rerun bootstrap if a series file changes (patch added or removed)
637 # or an existing patch changes. Since we always have an series file (even if
638 # it is empty), this also handles us adding the first patch for something.
639 patches=
640 for d in patches/* ; do
641 series=$d/series
642 echo "$series:" >> configure.tmp2
643 cat << END
644 $series\\\\
646 sed -n 's/[ ]*\(#.*\)\?$//;/./p' "$series" |\
647 while read p ; do
648 patch=$d/$p
649 cat << END
650 $patch\\\\
652 # Because there's a pipeline, this is a subshell, so use a temporary file
653 # rather than a variable to compile a list of patches to use below.
654 echo "$patch:" >> configure.tmp2
655 done
656 done >> configure.tmp
658 cat <<'END_OF_CONFIGURE' >> configure.tmp
659 $srcdir/bootstrap
660 $srcdir/bootstrap
662 .PHONY: $targets recheck
664 # Dummy dependencies to allow removing patches we no longer need.
665 END_OF_CONFIGURE
667 cat configure.tmp2 >> configure.tmp
669 cat <<'END_OF_CONFIGURE' >> configure.tmp
671 mv -f Makefile.tmp Makefile
672 trap - EXIT
673 echo "Configured successfully - now run \"${MAKE-make}\""
674 END_OF_CONFIGURE
676 rm -f configure.tmp2
678 chmod +x configure.tmp
679 mv -f configure.tmp configure
681 trap - EXIT
682 echo "Bootstrapped successfully - now run \"$srcdir/configure\" and \"${MAKE-make}\""