File: bootstrap

package info (click to toggle)
code-saturne 5.3.2%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 76,868 kB
  • sloc: ansic: 338,582; f90: 118,487; python: 65,227; makefile: 4,429; cpp: 3,826; xml: 3,078; sh: 1,205; lex: 170; yacc: 100
file content (126 lines) | stat: -rwxr-xr-x 3,202 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#! /bin/sh

if [ ! -d sbin ]; then
  echo "$0 must be called from top directory (../$0)"
  exit 1
fi

for d in `\ls`; do
  if test -f $d/sbin/bootstrap; then
    (cd $d && ./sbin/bootstrap)
  fi
done

# update POTFILES.in

echo "Generating po/POTFILES.in"
ls preprocessor/*/*.c src/*/*.c* | grep -v user_examples > po/POTFILES.in

# Remove unversioned files added by previous bootstrap

for f in `ls ./build-aux` ; do
  case $f in
    *.py | catalyst | *.makefile) ;;
    *) rm -rf $d/build-aux/*$ ;;
  esac
done

rm -rf m4/codeset.m4 m4/fcntl-o.m4 m4/gettext.m4 \
       m4/glibc2.m4 m4/glibc21.m4 m4/iconv.m4 m4/intdiv0.m4 \
       m4/intl.m4 m4/intldir.m4 m4/intlmacosx.m4 m4/intmax.m4 \
       m4/inttypes-pri.m4 m4/inttypes_h.m4 m4/lcmessage.m4 \
       m4/lock.m4 m4/longlong.m4 m4/lib-ld.m4 m4/lib-link.m4 \
       m4/lib-prefix.m4 m4/libtool.m4 m4/lt~obsolete.m4 \
       m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/nls.m4 \
       m4/printf-posix.m4 m4/po.m4 m4/progtest.m4 m4/size_max.m4 \
       m4/stdint_h.m4 m4/threadlib.m4 m4/uintmax_t.m4 m4/visibility.m4 \
       m4/wchar_t.m4 m4/wint_t.m4 m4/xsize.m4

# Simply run autoreconf.

# If only gettext 0.17 or 0.18 is available, allow it by modifying configure.ac
# temporarily, but otherwise prefer 0.19 (which avoids automake warnings)

cs_gettext_version=`gettext --version | head -1 | sed -e s/gettext.*0/0/`
case $cs_gettext_version in
  0.17* | 0.18*)
    cp -p configure.ac configure.ac.tmp
    sed -e s/AM_GNU_GETTEXT_VERSION.*/AM_GNU_GETTEXT_VERSION\(\[$cs_gettext_version\]\)/g ./configure.ac.tmp > configure.ac
    ;;
  *)
    ;;
esac

# Prefer autoreconf to separate stages when possible

type autopoint > /dev/null 2>&1

if test $? = 0 ; then

  autoreconf -vif $@

else

  # To add gettext support, use :
  # gettextize -f -c --no-changelog --intl
  # rm -f config/gettext.m4

  # To use an external gettext version, do not use --intl
  # To use a link instead of copy, do not use -c

  echo "running gettextize"
  \rm -rf configure.ac~ Makefile.am~
  sed -e "s/read dummy/# read dummy/" `which gettextize` > ./tmp_gettextize
  chmod +x ./tmp_gettextize
  ./tmp_gettextize -f -c --no-changelog
  if [ -f configure.ac~ ]; then
    mv configure.ac~ configure.ac
  fi
  if [ -f Makefile.am~ ]; then
    mv Makefile.am~ Makefile.am
  fi
  rm -rf po/*~ tmp_gettextize

  echo "running aclocal"
  aclocal -I config

  echo "running autoconf"
  autoconf

  if [ ! -f config/ltmain.sh ]; then
    echo "running libtoolize"
    libtoolize --force --copy
  fi

  echo "running autoheader"
  autoheader

  echo "running automake"
  automake -a -c

fi

case $cs_gettext_version in
  0.17* | 0.18*)
    \mv configure.ac.tmp configure.ac
    ;;
  *)
    ;;
esac

# Remove cache directory
\rm -rf autom4te.cache

# Update mei_parser and mei_scanner if possible
# (if not, keep from previous bootstrap)

which bison > /dev/null 2>&1
if test $? = "0"; then
  which flex > /dev/null 2>&1
fi
if test $? = "0"; then
  echo "running flex for MEI scanner"
  flex -o ./src/mei/mei_scanner.c ./src/mei/mei_scanner.l
  echo "running bison for MEI parser"
  bison --defines=./src/mei/mei_parser.h -o src/mei/mei_parser.c ./src/mei/mei_parser.y
fi