Commit fd025886 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add scripts to build autotools scaffolds.

parent 50883356
#! /bin/bash
#
# This script contains all the necessary steps to recreate the
# autotools files to build PPM.
#
# Copyright (C) 2021 Thomas Jahns <jahns@dkrz.de>
#
# Version: 1.0
# Author: Thomas Jahns <jahns@dkrz.de>
# Keywords: autotools autogen autoconf libtool automake
# Maintainer: Thomas Jahns <jahns@dkrz.de>
# URL: https://www.dkrz.de/redmine/projects/scales-ppm
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# Neither the name of the DKRZ GmbH nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
libtoolize --force --copy
libtoolversion=$(libtoolize --version \
| sed -e 's/^libtoolize \(([^)]*) \)\{0,1\}\([0-9.]*\)/\2/;q')
declare -a patches
case "$libtoolversion" in
2.4.6)
patches=(contrib/00nagfor-libtool-patch/nagfor-libtool-2.4.6.patch \
contrib/01aix-deplib-rpath-patch/aix-deplib-libtool.patch \
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.6.patch \
contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \
contrib/05macos-nagfor-patch/macos-nagfor.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch \
contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch)
;;
2.4.2)
patches=(contrib/00nagfor-libtool-patch/nagfor-libtool.patch \
contrib/01aix-deplib-rpath-patch/aix-deplib-libtool.patch \
contrib/02nagfor53-shared-patch/nagfor53-shared.patch \
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.2.patch \
contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \
contrib/05macos-nagfor-patch/macos-nagfor.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch)
;;
esac
for patch in "${patches[@]}"; do
echo "applying $patch" >&2
patch -p1 <$patch
done
autoreconf -i
find . -name Makefile.in -print0 | xargs -0 sed -i -e 's/[ ][ ]*$//'
\rm -f config/ltmain.sh.orig m4/libtool.m4.orig
wget -o /dev/null -O config/config.guess \
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
wget -o /dev/null -O config/config.sub \
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD'
#
# to test if this succeeded, one can run
# diff -x autom4te.cache -x .git -ur orig/yaxt new/yaxt 2>&1 |less
# if a known good checkout is at orig/yaxt and a newly reconfigured
# tree is at new/yaxt
#
# Local Variables:
# mode: sh
# license-project-url: "https://www.dkrz.de/redmine/projects/scales-ppm"
# license-default: "bsd"
# End:
#
#! /bin/bash
#
# reconfigure-mistral --- run scripts/reconfigure in reprocible
# environment on DKRZ mistral
#
#
# Copyright (C) 2021 Thomas Jahns <jahns@dkrz.de>
#
# Version: 1.0
# Author: Thomas Jahns <jahns@dkrz.de>
# Maintainer: Thomas Jahns <jahns@dkrz.de>
# URL: https://www.dkrz.de/redmine/projects/scales-ppm
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# Neither the name of the DKRZ GmbH nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
. /sw/rhel6-x64/etc/profile.mistral
module load autoconf/2.69 automake/1.14.1 libtool/2.4.6
autoconf --version
automake --version
libtoolize --version
scripts/reconfigure
if [ -x scripts/recreate-testsuite.sh ]; then
exec scripts/recreate-testsuite.sh
fi
#
# Local Variables:
# mode: sh
# license-project-url: "https://www.dkrz.de/redmine/projects/scales-ppm"
# license-default: "bsd"
# End:
#
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment