summaryrefslogtreecommitdiff
path: root/bin/bootstrap
blob: 2d2737c4feded8e4e341b32a7fa433ea3e2ec0c2 (plain)
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
127
128
129
130
131
132
133
134
135
136
#! /bin/sh

# -------------------------------------------------------------------------
#       $Id$
# 
# Bootstrap ACE/TAO configuration tools when checked out from CVS.
# Requires GNU autoconf, GNU automake and GNU libtool.
#
# This script is only meant to be run by ACE/TAO maintainers.
# 
# -------------------------------------------------------------------------

#  Copyright (C) 1999, 2002  Ossama Othman
#
#  All Rights Reserved
#
# This library is free software; you can redistribute it and/or
# modify it under the current ACE distribution terms.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


set -e

# If paginator environment variable isn't set then use `more'.
test -z $PAGER && PAGER=more

usage()
{
    cat <<EOF | $PAGER
Usage: bootstrap [OPTIONS]

Generic options:
  --help	  display this help and exit

EOF

    exit $1
}


if test $# -gt 2; then
    usage 1
fi

while test $# -gt 0; do
    case "$1" in
    --help)
	usage 0
	;;
    esac
    shift
done


# This script must be run from the top-level ACE source directory
if test -d m4; then

  # Set the PATH containing the GNU tools
  if (uname | grep SunOS > /dev/null 2>&1); then
    PATH=/project/danzon/pkg/gnu/bin:$PATH
    export PATH
  fi

  # Update the NEWS file
  # For now just copy the contents of the `VERSION' file to make automake
  # happy.  Eventually, we should start putting real news in to it.
  echo "Creating a NEWS file"
  cp VERSION NEWS

  # Generate an `aclocal.m4' file from all existing m4 macro files
  # including those in the `m4' directory.
  echo "Running aclocal"
  aclocal -I m4

# Make sure libtool support files are available.
  echo "Running libtool"
  libtoolize --automake

  echo "Running automake"
  automake --add-missing

  # Generate a `config.h.in' configuration header template from `acconfig.h'.
  echo "Running autoheader"
  autoheader -I m4

  # Generate the `configure' script from the `configure.in'.
  echo "Running autoconf"
  autoconf

#   # Generate the man pages.
#   # Only generate man pages if bootstrapping a release.
#   if test $bootstrap_release = yes; then
#     if test -f man/man3/ACE.3; then
#       echo ACE man pages have already been generated.
#     else
#       echo 'Generating the ACE man pages (this may take several minutes)'

#       (ACE_ROOT=.; \
#        export ACE_ROOT; \
#        ./bin/generate_doxygen.pl -is_release -exclude_tao > /dev/null)
#     fi  # test -f man/man3/ACE.3
#   fi  # test $bootstrap_release = yes

#   # Regenerate the man pages lists in the man page Makefiles.

#   if test -f man/man3/Makefile.am; then
#     # Only insert man page lists if bootstrapping a release.
#     if test $bootstrap_release = yes; then
#       echo 'Inserting ACE man page lists into appropriate Makefile.am files.'
#       ACE_MAN_PAGES=`(cd man/man3 && echo *.3)`
#     else
#       ACE_MAN_PAGES=
#     fi

#     (cd man/man3; \
#      eval "sed -e 's/^man_MANS =.*$/man_MANS = $ACE_MAN_PAGES/' \
#        Makefile.am > Makefile.am.new"; \
#      mv Makefile.am.new Makefile.am)
#     (cd man/html; \
#      eval "sed -e 's/^html_DATA =.*$/html_DATA = $ACE_HTML_MAN_PAGES/' \
#        Makefile.am > Makefile.am.new"; \
#      mv Makefile.am.new Makefile.am)
#   else
#     test -f man/man3/Makefile.am || echo 'man/man3/Makefile.am is missing!'
#     exit 1;
#   fi  # test -f man/man3/Makefile.am

  # Provide some more "useful" information.
  echo "Done bootstrapping."
else
  echo "ACE must be bootstrapped from the top-level ACE source directory."
  exit 1;
fi  # test -d m4