Skip to content

Commit

Permalink
autotools: start new tree so we can re-organise how autoconf, automak…
Browse files Browse the repository at this point in the history
…e and

libtool are handled. We want to have as little of the Starlink build support
files in the various repositories as we can so that merges are easier. The
remaining problem with this idea is that any modifications require that the
distributed files are re-created so we still a lot of configure and
Makefile.in files updated.
  • Loading branch information
pwdraper committed Feb 26, 2014
1 parent cbd5bfa commit ffa7a38
Show file tree
Hide file tree
Showing 9 changed files with 375 additions and 0 deletions.
9 changes: 9 additions & 0 deletions thirdparty/fsf/autotools/README
@@ -0,0 +1,9 @@
These are the autotools that we use to build the Starlink software.

They are not normal components so do not "bootstrap" in the usual manner and
have their configurable states checked in so that they can be built directly
without the bootstrap phase.

Peter W. Draper

17-DEC-2013.
23 changes: 23 additions & 0 deletions thirdparty/fsf/autotools/autoconf/Makefile.am
@@ -0,0 +1,23 @@
## Process this file with automake to produce Makefile.in

@SET_MAKE@

RECURSIVE_TARGETS = all check

$(RECURSIVE_TARGETS):
( cd autoconf; $(MAKE) $@; )

## Automake really requires local versions for these targets.
distclean-local:
( cd autoconf; $(MAKE) distclean )

clean-local:
( cd autoconf; $(MAKE) clean )

EXTRA_DIST = autoconf

## Before distributing subdirectories we need to clean up and remove any
## softlinks.
dist-hook:
rm -rf `find $(distdir) -type l`
(cd $(distdir)/autoconf; make distclean)
11 changes: 11 additions & 0 deletions thirdparty/fsf/autotools/autoconf/README.Starlink
@@ -0,0 +1,11 @@

This is GNU autoconf 2.69 with patches to support Fortran and preprocessed
Fortran for the Starlink project.

The "autoconf" directory contains the modified vendor source. It should be
updated as appropriate and files regenerated with an unmodified
autoconf/automake (as same version as from the original distribution) as there
are no Starlink configuration requirements, they should only be found in this
directory. The intention is to keep patches against vendor as simple as
possible.

159 changes: 159 additions & 0 deletions thirdparty/fsf/autotools/autoconf/bootstrap
@@ -0,0 +1,159 @@
#! /bin/sh -
# original bootstrap file, installed by starconf 1.3, rnum=1003000
# If you _need_ to change this file, delete `original' in the line above,
# or else starconf may overwrite it with an updated version.
#
# bootstrap.installed. Generated from bootstrap.installed.in by configure.
#
# Bootstrap a checked-out component of the Starlink software tree.
# Run this script in a freshly checked-out directory to bring the
# system to the point where you can just type ./configure;make
#
# Usage:
# ./bootstrap


# This script should be installed, by starconf, in all `component
# directories'. A `component directory' is a directory which has a
# component.xml.in file in it. All component directories will have a
# manifest file created and installed in .../manifests; non-component
# directories will not have manifest files. Everything that's
# installed should be installed as part of some component
# or other.
#
# The ./bootstrap scripts will stop recursing when they find a
# component.xml.in file. They'll warn if they find a component.xml.in
# file in any AC_CONFIG_SUBDIRS directory, but ignore it, and exit
# with an error if they do not find a component.xml.in file and there
# are no AC_CONFIG_SUBDIRS directories in which to search further.
# That is, the tree of directories which the top-level bootstrap
# traverses should have component.xml.in files at or above all its
# leaves.


# The starconf below might update bootstrap, if a newer version is
# available. Unfortunately, this confuses sh, which appears _not_ to
# keep open the script it's reading, but to reopen it afresh, or reseek
# within the file, for each line (or something like that!?).
# So rewrite this script to a temporary file and exec it.
tempfile="${TMP-/tmp}/$0-$$.tmp"
rm -f $tempfile
echo "trap 'rm -f $tempfile' 0" >$tempfile # remove temporary at exit
sed '1,/^--TRAMPOLINE--/d' $0 >>$tempfile # strip out the trampoline
exec /bin/sh $tempfile # exec the temporary
--TRAMPOLINE--


echo "Bootstrapping `pwd` ..."

if test ! -f configure.ac; then
echo "bootstrap: No configure.ac in directory `pwd`" >&2
exit 1
fi

subdirs=`autoconf --trace=AC_CONFIG_SUBDIRS:$% configure.ac`

if test -f component.xml.in; then

if starconf --show buildsupport >/dev/null 2>&1; then

# starconf is in the path
echo "...using starconf in " `starconf --show buildsupport`
starconf || exit 1

else

# The temptation here is to use ./starconf.status to find the
# starconf that it came from and invoke that explicitly. Don't do
# this, however: we don't want to be too clever, and it's better
# to be consistent with the way the autotools behave (the first
# one in your path is the one that works, and they don't have this
# sort of `phone home' cleverness in them).

echo "bootstrap error: The starconf application is not in your path"

# This doesn't stop us being helpful, however.
if test -f ./starconf.status; then
starconf_home=`./starconf.status --show buildsupport`
echo "This directory was last bootstrapped with $starconf_home/bin/starconf"
fi

exit 1
fi

# Check that there are no component.xml.in files in any subdirectories
if test -n "$subdirs"; then
for d in $subdirs
do
if test -d "$d" && test -f "$d/component.xml.in"; then
echo "bootstrap: warning: ignoring child $d/component.xml.in" >&2
fi
done
fi

# If STAR_SUPPRESS_AUTORECONF is true in the environment, then we
# suppress the call of `autoreconf'. This is here _only_ so that
# the top-level bootstrap file can suppress multiple calls of this
# in bootstrap scripts in its children. This mechanism must not
# be used by users, as it is likely to change without warning.
if ${STAR_SUPPRESS_AUTORECONF-false}; then
echo "Suppressing autoreconf in" `pwd`
else
echo autoreconf --install --symlink
autoreconf --install --symlink || exit 1
fi

else

# This is not a component directory, so simply recurse into the children.

# ...if there are any, that is.
if test -z "$subdirs"; then
echo "bootstrap: error: non-component directory `pwd` has no subdirs" >&2
exit 1
fi

# Bootstrap the child directories mentioned in AC_CONFIG_SUBDIRS.
# These bootstrap files must exist.
for d in $subdirs
do
if test -d "$d"; then
echo "Bootstrapping $d..."
if test -f $d/bootstrap; then
# good...
(cd $d; /bin/sh ./bootstrap)
else
echo "bootstrap: no file $d/bootstrap" >&2
exit 1
fi
fi
done

fi

# Checked out files don't necessarily have the correct timestamps. If
# any local build procedures depend on the checked in state (true for
# thirdparty code that should not be automatically autoconf'd, or automake'd
# by our local autotools), then this needs correcting, so provide a
# simple mechanism that just touches the files in the correct order.
# (Note this became a problem with subversion, CVS preserved the
# checkin dates by default).
#
# Look for a file "bootstrap_timeorder" in the local directory, if
# found just read each line and touch the existing files in turn.
# Need to sleep between touches as the resolution of these times
# is usually about 1 second (so keep the files to be touched to a
# minimum).
if test -f "bootstrap_timeorder"; then
echo "bootstrap: restoring timestamp order..."
for f in `cat bootstrap_timeorder` ""
do
if test -f "$f"; then
touch "$f"
sleep 1
echo " $f"
fi
done
fi

exit 0
34 changes: 34 additions & 0 deletions thirdparty/fsf/autotools/autoconf/bootstrap_autoconf
@@ -0,0 +1,34 @@
#!/bin/sh

# Commands used to bootstrap the autoconf/ directory after tracking a new
# revision, generating various files. You may also need to revisit the
# bootstrap_timeorder issues. Remember cd into autoconf before running
# this command.

if ! test -f "maint.mk"; then
echo "Run this command in autoconf/"
exit 1
fi

# Cribbed from: http://lifecs.likai.org/2012/06/building-autotools-from-git.html

run () {
echo $*
eval $*
}

# Do this initially.
# git clean -fdx

run aclocal -I m4
run automake --add-missing
run autoconf
run rm INSTALL

run git status

echo
echo "*** Now run configure and make to regenerate INSTALL ***"
echo

exit
17 changes: 17 additions & 0 deletions thirdparty/fsf/autotools/autoconf/bootstrap_timeorder
@@ -0,0 +1,17 @@
# Establish the time order of some files directories.
# Don't want to regenerate these automatically.
autoconf/configure.ac
autoconf/aclocal.m4
autoconf/configure
autoconf/Makefile.in
autoconf/bin/Makefile.in
autoconf/config/Makefile.in
autoconf/doc/Makefile.in
autoconf/lib/Autom4te/Makefile.in
autoconf/lib/Makefile.in
autoconf/lib/autoconf/Makefile.in
autoconf/lib/autoscan/Makefile.in
autoconf/lib/autotest/Makefile.in
autoconf/lib/emacs/Makefile.in
autoconf/lib/m4sugar/Makefile.in
autoconf/man/Makefile.in
41 changes: 41 additions & 0 deletions thirdparty/fsf/autotools/autoconf/component.xml
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<!DOCTYPE component SYSTEM "componentinfo.dtd">

<component id="autoconf" buildsupport="yes" support="U">
<version>starlink-2.69</version>
<path>thirdparty/fsf/autoconf</path>
<description>Starlink autoconf</description>
<!-- <abstract><p></p></abstract> -->
<dependencies/>
<developers>
<!-- Cast of thousands, but locally to Starlink... -->
<person>
<name>Norman Gray</name>
<uname>nxg</uname>
<email>starlink@jiscmail.ac.uk</email>
<role>owner</role>
</person>
<person>
<name>Peter W. Draper</name>
<uname>pwdraper</uname>
<email>starlink@jiscmail.ac.uk</email>
<role>owner</role>
</person>
</developers>
<bugreports>@PACKAGE_BUGREPORT</bugreports>
<copyright>
<year>1994-2013</year>
<name>Free Software Foundation</name>
</copyright>
<copyright>
<year>2004-5</year>
<name>Council for the Central Laboratory of the Research
Councils</name>
<notes>
<p>Modifications</p>
</notes>
</copyright>
<notes><p>This version of autoconf has been patched to include
Fortran preprocessor support and general Fortran portability.
</p></notes>
</component>
41 changes: 41 additions & 0 deletions thirdparty/fsf/autotools/autoconf/component.xml.in
@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<!DOCTYPE component SYSTEM "componentinfo.dtd">

<component id="@PACKAGE@" buildsupport="yes" support="U">
<version>@PACKAGE_VERSION@</version>
<path>thirdparty/fsf/autoconf</path>
<description>Starlink autoconf</description>
<!-- <abstract><p></p></abstract> -->
<dependencies/>
<developers>
<!-- Cast of thousands, but locally to Starlink... -->
<person>
<name>Norman Gray</name>
<uname>nxg</uname>
<email>starlink@jiscmail.ac.uk</email>
<role>owner</role>
</person>
<person>
<name>Peter W. Draper</name>
<uname>pwdraper</uname>
<email>starlink@jiscmail.ac.uk</email>
<role>owner</role>
</person>
</developers>
<bugreports>@PACKAGE_BUGREPORT</bugreports>
<copyright>
<year>1994-2013</year>
<name>Free Software Foundation</name>
</copyright>
<copyright>
<year>2004-5</year>
<name>Council for the Central Laboratory of the Research
Councils</name>
<notes>
<p>Modifications</p>
</notes>
</copyright>
<notes><p>This version of autoconf has been patched to include
Fortran preprocessor support and general Fortran portability.
</p></notes>
</component>
40 changes: 40 additions & 0 deletions thirdparty/fsf/autotools/autoconf/configure.ac
@@ -0,0 +1,40 @@
dnl Process this file with autoconf to produce a configure script
AC_REVISION($Revision: 19893 $)

dnl Initialisation: package name and version number
AC_INIT([autoconf],[starlink-2.69],[starlink@jiscmail.ac.uk])

dnl Require autoconf-2.69 at least
AC_PREREQ([2.69])
dnl Require Starlink automake
AM_INIT_AUTOMAKE(1.8.2-starlink)

dnl Sanity-check: name a file in the source directory -- if this
dnl isn't found then configure will complain
AC_CONFIG_SRCDIR([autoconf/configure.ac])

dnl Include defaults for Starlink configurations
STAR_DEFAULTS

dnl We may want to invoke make recursively
AC_PROG_MAKE_SET

dnl To configure autoconf, run ./configure in the subdirectory.

# Look for --disable-shared and pass it on.
(
cd autoconf; \
cmd="./configure --prefix=$prefix \
--srcdir=. \
--cache-file=../config.cache"; \
echo $cmd; \
$cmd; \
)

STAR_SPECIAL_INSTALL_COMMAND([
( cd autoconf; $(MAKE) INSTALL_ROOT=$$DESTDIR DESTDIR=$$DESTDIR install );
])

AC_CONFIG_FILES([Makefile component.xml])

AC_OUTPUT

0 comments on commit ffa7a38

Please sign in to comment.