Update and clean Tomato RAF files
[tomato.git] / release / src / router / pptpd / reconf
blob8516bebcd6aa3ab2c62bb3e2f1c5d8437ae55278
1 #! /bin/sh
3 # Reconfigure for a release, by updating the Makefile dependencies and
4 # running the autotools.
6 # $Id: reconf,v 1.3 2004/04/23 10:06:17 quozl Exp $
8 # make the existing config.h disappear temporarily
9 if test -f config.h
10 then
11 mv -f config.h config.h.TMP
13 touch config.h
15 # rebuild dependencies (makedepend)
16 for makefile in Makefile.am Makefile.uClinux
18 echo -n "Rebuilding $makefile..."
19 head -`grep -n 'DO NOT ADD BELOW THIS POINT' $makefile | \
20 cut -d: -f1` $makefile > $makefile.new
21 for file in *.c
23 if test "$makefile" = "Makefile.uClinux"
24 then
25 gcc -MM $file -include config.embed.h
26 else
27 gcc -MM $file -DHAVE_CONFIG_H
29 echo ''
30 done >> $makefile.new
31 echo 'done.'
32 if ! cmp -s $makefile.new $makefile
33 then
34 echo "Changes: <=old >=new"
35 diff $makefile $makefile.new | grep '^[<>]'
36 mv -f $makefile.new $makefile
37 else
38 rm -f $makefile.new
39 echo "No change."
41 done
43 # restore the previous config.h
44 rm -f config.h
45 if test -f config.h.TMP
46 then
47 mv -f config.h.TMP config.h
50 # show us what we do next
51 set -x
53 # reset the configuration
54 rm -f config.cache
55 rm -f config.log
57 # run the build tools sequence
58 aclocal
59 autoconf
60 automake -a --copy --verbose
61 autoheader