source: trunk/bootstrap

Last change on this file was 3172, checked in by Peter, 8 years ago

add --help and --install options to bootstrap. --help does the obvious. With --install aclocal will be called so that m4 files are updated in; useful for maintainer but might be dangerous for random bootstrapper.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
RevLine 
[9]1#!/bin/sh
2
3# $Id: bootstrap 3172 2014-03-04 02:38:11Z peter $
4
[2121]5# Copyright (C) 2003 Jari Häkkinen
[831]6# Copyright (C) 2005 Peter Johansson
[2121]7# Copyright (C) 2006 Jari Häkkinen
8# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
[3172]9# Copyright (C) 2009, 2011, 2014 Peter Johansson
[675]10#
[1437]11# This file is part of the yat library, http://dev.thep.lu.se/yat
[675]12#
13# The yat library is free software; you can redistribute it and/or
14# modify it under the terms of the GNU General Public License as
[1486]15# published by the Free Software Foundation; either version 3 of the
[675]16# License, or (at your option) any later version.
17#
18# The yat library is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21# General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
[1487]24# along with yat. If not, see <http://www.gnu.org/licenses/>.
[675]25
[9]26# Run this to generate all auto-generated files needed by the GNU
[3172]27# configure program.
[9]28
[3172]29func_help ()
30{
31cat <<EOF
32Usage: $me [OPTION]...
33
34Available Options:
35  -h, --help      display this help and exit
36  -i, --install   update M4 macro files in m4/
37  -v, --verbose   verbosely report processing
38EOF
39}
40
[2095]41me=bootstrap
42verbose=no
[3172]43install=no
[2095]44# parse options
45while test $# -gt 0; do
46    case "$1" in
[3172]47  --help | -h) func_help; exit 0;;
48  --install | -i) install=yes;;
[2095]49  --verbose | -v) verbose=yes;;
50  *) echo "$me: invalid option '$1'" >& 2 && exit 1;;
51    esac
52    shift;
53done
[3172]54
55: ${ACLOCAL="aclocal"}
56export ACLOCAL
57
[2470]58cmd="autoreconf --install --symlink --force";
[2095]59if test "x$verbose" = "xno"; then
[2470]60    exec > /dev/null
61else
62    cmd="$cmd --verbose"
[1757]63fi
[3172]64test x"$install" = x"yes" && ACLOCAL="$ACLOCAL --install"
65
[2095]66echo "$me: running: $cmd";
67exec $cmd;
Note: See TracBrowser for help on using the repository browser.