Skip to content
Snippets Groups Projects
Commit 7117d3c8 authored by Axel Naumann's avatar Axel Naumann
Browse files

More conf/make files.

parent 8cbd12d8
No related branches found
No related tags found
No related merge requests found
#! /bin/sh
# Script to generate a shared library.
# Called by main Makefile.
#
# Author: Fons Rademakers, 29/2/2000
if [ "$1" = "-v" ] ; then
MAJOR=$2
MINOR=$3
REVIS=$4
shift
shift
shift
shift
fi
if [ "$1" = "-x" ] ; then
EXPLICIT="yes"
shift
fi
PLATFORM=$1
LD=$2
LDFLAGS=$3
SOFLAGS=$4
SONAME=$5
LIB=$6
OBJS=$7
EXTRA=$8
rm -f $LIB
if [ $PLATFORM = "aix" ] || [ $PLATFORM = "aix5" ]; then
soext="a"
else
soext="so"
fi
LIBVERS=
VERSION=
EXPLLNKCORE=
if [ "x$EXPLICIT" = "xyes" ]; then
if [ $LIB != "lib/libminicern.$soext" ]; then
if [ $LIB != "lib/libCore.$soext" -a $LIB != "lib/libCling.$soext" ]; then
EXPLLNKCORE="-Llib -lCore"
else
EXPLLNKCORE=""
fi
fi
if [ $PLATFORM = "linux" ] || [ $PLATFORM = "linux-k1om" ]; then
if [ -z "$EXPLLNKCORE" ]; then
EXPLLNKCORE=" -ldl"
else
EXPLLNKCORE=${EXPLLNKCORE}" -ldl"
fi
fi
fi
if [ $PLATFORM = "aix" ] || [ $PLATFORM = "aix5" ]; then
if [ $PLATFORM = "aix" ]; then
makeshared="/usr/ibmcxx/bin/makeC++SharedLib"
fi
if [ $PLATFORM = "aix5" ]; then
makeshared="/usr/vacpp/bin/makeC++SharedLib"
fi
if [ $LD = "xlC" ] || [ $LD = "xlC_r" ]; then
cmd="$makeshared -o $LIB -p 0 $OBJS $EXPLLNKCORE $EXTRA"
echo $cmd
$cmd
fi
if [ $LD = "g++" ]; then
cmd="$LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXPLLNKCORE $EXTRA"
echo $cmd
$cmd
fi
elif [ $PLATFORM = "alphaegcs" ] || [ $PLATFORM = "hpux" ] || \
[ $PLATFORM = "solaris" ] || [ $PLATFORM = "sgi" ]; then
cmd="$LD $SOFLAGS $LDFLAGS -o $LIB $OBJS $EXPLLNKCORE $EXTRA"
echo $cmd
$cmd
elif [ $PLATFORM = "lynxos" ]; then
cmd="ar rv $LIB $OBJS $EXTRA"
echo $cmd
$cmd
elif [ $PLATFORM = "fbsd" ] || [ $PLATFORM = "obsd" ]; then
if [ "x$MAJOR" = "x" ] ; then
cmd="$LD $SOFLAGS$SONAME $LDFLAGS -o $LIB \
`lorder $OBJS | tsort -q` $EXPLLNKCORE $EXTRA"
else
cmd="$LD $SOFLAGS$SONAME.$MAJOR.$MINOR $LDFLAGS -o $LIB.$MAJOR.$MINOR \
`lorder $OBJS | tsort -q` $EXPLLNKCORE $EXTRA"
fi
echo $cmd
$cmd
elif [ $PLATFORM = "macosx" ]; then
export DYLD_LIBRARY_PATH=`pwd`/lib:$DYLD_LIBRARY_PATH
# Add versioning information to shared library if available
if [ "x$MAJOR" != "x" ]; then
VERSION="-compatibility_version ${MAJOR} -current_version ${MAJOR}.${MINOR}.${REVIS}"
SONAME=`echo $SONAME | sed "s/\(.*\)\.$soext/\1.${MAJOR}.$soext/"`
LIB=`echo $LIB | sed "s/\(\/*.*\/.*\)\.$soext/\1.${MAJOR}.${MINOR}.$soext/"`
LIBVERS=$LIB
fi
cmd="$LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS \
-ldl $EXPLLNKCORE $EXTRA $VERSION"
echo $cmd
$cmd
linkstat=$?
if [ $linkstat -ne 0 ]; then
exit $linkstat
fi
elif [ $PLATFORM = "ios" ]; then
export DYLD_LIBRARY_PATH=`pwd`/lib:$DYLD_LIBRARY_PATH
# Add versioning information to shared library if available
if [ "x$MAJOR" != "x" ]; then
VERSION="-compatibility_version ${MAJOR} -current_version ${MAJOR}.${MINOR}.${REVIS}"
SONAME=`echo $SONAME | sed "s/\(.*\)\.$soext/\1.${MAJOR}.$soext/"`
LIB=`echo $LIB | sed "s/\(\/*.*\/.*\)\.$soext/\1.${MAJOR}.${MINOR}.$soext/"`
LIBVERS=$LIB
fi
cmd="$LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS \
-ldl $EXPLLNKCORE $EXTRA $VERSION"
echo $cmd
$cmd
linkstat=$?
if [ $linkstat -ne 0 ]; then
exit $linkstat
fi
elif test "${LD#*wingcc_ld.sh}" != "$LD"; then
EXPLLNKCORE=
if [ $SONAME != "libminicern.dll" ]; then
if [ $SONAME = "libCore.dll" ]; then
EXPLLNKCORE=""
else
EXPLLNKCORE="-Llib -lCore"
fi
fi
if [ "x$MAJOR" != "x" ] ; then
MINORVERSION=`echo ${MINOR}$REVIS | sed 's,^0,,'`
VERSION="-Wl,--major-image-version,$MAJOR -Wl,--minor-image-version,$MINORVERSION"
SONAME=`echo $SONAME | sed "s/.*\./&${MAJOR}./"`
LIB=`echo $LIB | sed "s/\/*.*\/.*\./&${MAJOR}.${MINOR}./"`
LIBVERS=$LIB
fi
cmd="$LD $VERSION $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS $EXPLLNKCORE $EXTRA"
echo $cmd
$cmd
else
if [ "x$MAJOR" = "x" ] ; then
cmd="$LD $SOFLAGS$SONAME $LDFLAGS -o $LIB $OBJS $EXPLLNKCORE $EXTRA"
echo $cmd
$cmd
else
cmd="$LD $SOFLAGS$SONAME.$MAJOR.$MINOR $LDFLAGS \
-o $LIB.$MAJOR.$MINOR $OBJS $EXPLLNKCORE $EXTRA"
echo $cmd
$cmd
fi
fi
linkstat=$?
if [ $linkstat -ne 0 ]; then
exit $linkstat
fi
if [ "x$MAJOR" != "x" ]; then
if [ -f $LIB.$MAJOR.$MINOR ]; then
# Versioned library has format foo.so.3.05
ln -fs $SONAME.$MAJOR.$MINOR $LIB.$MAJOR
ln -fs $SONAME.$MAJOR $LIB
elif [ -f $LIBVERS ]; then
# Versioned library has format foo.3.05.so
source_file=`echo $SONAME | sed "s/.*\./&${MINOR}./"`
LIBNOMAJORMINOR=`echo $LIB|sed 's,\.'$MAJOR'\.'$MINOR',,'`
if [ $LIB != $LIBNOMAJORMINOR ]; then
LIBNOMINOR=`echo $LIB|sed 's,\.'$MINOR',,'`
ln -fs $source_file $LIBNOMINOR
ln -fs $source_file $LIBNOMAJORMINOR
fi
fi
fi
if [ $PLATFORM = "hpux" ]; then
chmod 555 $LIB
fi
echo "==> $LIB done"
exit 0
#!/bin/sh
#
# Extract the input needed to build a PCH for the main (enabled) ROOT modules.
# Script takes as argument the source directory path, the set of enabled
# modules and extra headers (from cling) to be included in the PCH.
#
# Copyright (c) 2014 Rene Brun and Fons Rademakers
# Author: Axel Naumann <axel@cern.ch>, 2014-10-16
# Usage: $0 <root-srcdir> "module0 module1 ... moduleN" header0 header1 ... headerN -- cxxflag0 cxxflag1 ...
srcdir=$1
shift
modules=$1
shift
outdir=etc/dictpch
allheaders=$outdir/allHeaders.h
alllinkdefs=$outdir/allLinkDefs.h
cppflags=$outdir/allCppflags.txt
# Remove leftover files from old versions of this script.
rm -f include/allHeaders.h include/allHeaders.h.pch include/allLinkDef.h all.h cppflags.txt include/allLinkDef.h etc/allDict.cxx etc/allDict.cxx.h $cppflags.tmp $allheaders $alllinkdefs $cppflags
mkdir -p $outdir
rm -f $allheaders $alllinkdefs
# Here we include the list of c++11 stl headers
# From http://en.cppreference.com/w/cpp/header
# regex is removed until ROOT-7004 is fixed
stlHeaders="cstdlib csignal csetjmp cstdarg typeinfo typeindex type_traits bitset functional utility ctime chrono cstddef initializer_list tuple new memory scoped_allocator climits cfloat cstdint cinttypes limits exception stdexcept cassert system_error cerrno cctype cwctype cstring cwchar cuchar string array vector deque list forward_list set map unordered_set unordered_map stack queue algorithm iterator cmath complex valarray random numeric ratio cfenv iosfwd ios istream ostream iostream fstream sstream iomanip streambuf cstdio locale clocale codecvt atomic thread mutex future condition_variable ciso646 ccomplex ctgmath cstdalign cstdbool"
echo "// STL headers" >> $allheaders
for stlHeader in $stlHeaders; do
echo '#if __has_include("'$stlHeader'")' >> $allheaders
echo '#include <'$stlHeader'>' >> $allheaders
echo '#endif' >> $allheaders
done
# Special case for regex
echo "// treat regex separately" >> $allheaders
echo '#if __has_include("regex") && !defined __APPLE__' >> $allheaders
echo '#include <regex>' >> $allheaders
echo '#endif' >> $allheaders
# treat this deprecated headers in a special way
stlDeprecatedHeaders="strstream"
echo "// STL Deprecated headers" >> $allheaders
echo "#define _BACKWARD_BACKWARD_WARNING_H" >> $allheaders
echo '#pragma clang diagnostic push' >> $allheaders
echo '#pragma GCC diagnostic ignored "-Wdeprecated"' >> $allheaders
for stlHeader in $stlDeprecatedHeaders; do
echo '#if __has_include("'$stlHeader'")' >> $allheaders
echo '#include <'$stlHeader'>' >> $allheaders
echo '#endif' >> $allheaders
done
echo '#pragma clang diagnostic pop' >> $allheaders
echo '#undef _BACKWARD_BACKWARD_WARNING_H' >> $allheaders
while ! [ "x$1" = "x" -o "x$1" = "x--" ]; do
echo '#include "'$1'"' >> $allheaders
shift
done
# Add ad hoc headers which are not in dictionaries and are not stl
# Can not be put in a dictionary until they properly handle ROOT/*
echo '#include "ROOT/TSeq.hxx"' >> $allheaders
echo '#include "ROOT/StringConv.hxx"' >> $allheaders
echo '#include "ROOT/TDataFrame.hxx"' >> $allheaders
if [ "x$1" = "x--" ]; then
shift
fi
while ! [ "x$1" = "x" ]; do
case $1 in
-Wno*) echo "$1" >> $cppflags.tmp ;;
-W*) ;;
-x*) ;;
-ax*) ;;
*) echo "$1" >> $cppflags.tmp ;;
esac
shift
done
for dict in `find $modules -name 'G__*.cxx' 2> /dev/null | grep -v core/metautils/src/G__std_ `; do
dirname=`dirname $dict` # to get foo/src
dirname=`echo $dirname | sed -e 's,/src$,,' -e 's,^[.]/,,' ` # to get foo/
case $dirname in
graf2d/qt | math/fftw | math/foam | math/fumili | math/mlp | math/quadp | math/splot | math/unuran | math/vdt | tmva/rmva ) continue;;
interpreter/* | core/* | io/io | net/net | math/* | hist/* | tree/* | graf2d/* | graf3d/ftgl | graf3d/g3d | graf3d/gl | gui/gui | gui/fitpanel | rootx | bindings/pyroot | roofit/* | tmva/* | main) ;;
*) continue;;
esac
# Check if selmodules already contains the dirname.
# Happens for instance for math/smatrix with its two (32bit and 64 bit)
# dictionaries.
if ! ( echo $selmodules | grep "$dirname " > /dev/null ); then
selmodules="$selmodules$dirname "
fi
awk 'BEGIN{START=-1} /includePaths\[\] = {/, /^0$/ { if (START==-1) START=NR; else if ($0 != "0") { sub(/",/,"",$0); sub(/^"/,"-I",$0); print $0 } }' $dict >> $cppflags.tmp
echo "// $dict" >> $allheaders
# awk 'BEGIN{START=-1} /payloadCode =/, /^;$/ { if (START==-1) START=NR; else if ($1 != ";") { code=substr($0,2); sub(/\\n"/,"",code); print code } }' $dict >> $allheaders
awk 'BEGIN{START=-1} /headers\[\] = {/, /^0$/ { if (START==-1) START=NR; else if ($0 != "0") { sub(/,/,"",$0); print "#include",$0 } }' $dict >> $allheaders
if ! test "$dirname" = "`echo $dirname| sed 's,/qt,,'`"; then
# something qt; undef emit afterwards
cat <<EOF >> $allheaders
#ifdef emit
# undef emit
#endif
#ifdef signals
# undef signals
#endif
EOF
elif ! test "$dirname" = "`echo $dirname| sed 's,net/ldap,,'`"; then
# ldap; undef Debug afterwards
cat <<EOF >> $allheaders
#ifdef Debug
# undef Debug
#endif
#ifdef GSL_SUCCESS
# undef GSL_SUCCESS
#endif
EOF
fi
for f in `cd $srcdir; find $dirname/inc/ -name '*LinkDef*.h'`; do
echo '#include "'$outdir/$f'"' >> $alllinkdefs
done
done
# E.g. core's LinkDef includes clib/LinkDef, so just copy all LinkDefs.
for f in `cd $srcdir; find . -path ./etc -prune -or -name '*LinkDef*.h' -print`; do
mkdir -p $outdir/`dirname $f`
cp $srcdir/$f $outdir/$f
done
cat $cppflags.tmp | sort | uniq | grep -v $srcdir | grep -v `pwd` > $cppflags
# Remove unwanted files
#sed -e "s/.*HEADER.h.*//g" \
# < $allheaders > $allheaders.tmp
#mv -f $allheaders.tmp $allheaders
echo
echo Generating PCH for ${selmodules}
echo
#! /bin/sh
ROOT=bin/root.exe
OUT=etc/system.plugins-ios
DATE=`date`
echo ""
echo "Generating etc/system.plugins-ios"
echo ""
$ROOT -l <<makeplugins
gPluginMgr->WritePluginRecords("plugins-ios");
.q
makeplugins
echo "# This file has been generated using:" > $OUT
echo "# make plugins-ios" >> $OUT
echo "# On $DATE" >> $OUT
echo "# DON'T MAKE CHANGES AS THEY WILL GET LOST NEXT TIME THE FILE IS GENERATED" >> $OUT
cat plugins-ios >> $OUT
rm -f plugins-ios
exit 0
#! /bin/sh
# Script to generate statically linked ROOT executables.
# Called by main Makefile.
#
# Author: Fons Rademakers, 21/01/2001
PLATFORM=$1
CXX=$2
CC=$3
LD=$4
LDFLAGS="$5 -Wl,-E "
XLIBS=$6
SYSLIBS=$7
EXTRALIBS=$8
STATICOBJECTLIST=$9
ROOTALIB=lib/libRoot.a
ROOTAEXE=bin/roota
PROOFAEXE=bin/proofserva
rm -f $ROOTAEXE $PROOFAEXE
# If linking with Cocoa framework, then don't use XLIBS
if echo $EXTRALIBS | grep ' Cocoa' > /dev/null 2>& 1 ; then
XLIBS=
fi
echo "Making $ROOTAEXE..."
CMD="$LD $LDFLAGS -o $ROOTAEXE main/src/rmain.o \
-Wl,--no-as-needed -Wl,--whole-archive $ROOTALIB -Wl,--as-needed -Wl,--no-whole-archive \
$XLIBS $SYSLIBS $EXTRALIBS"
echo $CMD
$CMD
linkstat=$?
if [ $linkstat -ne 0 ]; then
exit $linkstat
fi
echo "Making $PROOFAEXE..."
CMD="$LD $LDFLAGS -o $PROOFAEXE main/src/pmain.o \
-Wl,--no-as-needed -Wl,--whole-archive $ROOTALIB -Wl,--as-needed -Wl,--no-whole-archive \
$XLIBS $SYSLIBS $EXTRALIBS"
echo $CMD
$CMD
linkstat=$?
if [ $linkstat -ne 0 ]; then
exit $linkstat
fi
exit 0
#! /bin/sh
# Script to generate the libRoot.a archive library.
# Called by main Makefile.
#
# Author: Fons Rademakers, 21/01/2001
STATICOBJECTLIST=$1
ROOTALIB=lib/libRoot.a
rm -f $ROOTALIB
objs=`$STATICOBJECTLIST`
echo "Making $ROOTALIB..."
echo ar rv $ROOTALIB core/textinput/src/textinput/*.o $objs
ar rv $ROOTALIB core/textinput/src/textinput/*.o $objs > /dev/null 2>&1
arstat=$?
if [ $arstat -ne 0 ]; then
exit $arstat
fi
exit 0
#! /bin/sh
#
# A simple reconfigure script.
#
# Author: Axel Naumann
#
######################################################################
if [ ! -f config.status ]; then
echo ""
echo "Can't get config line from config.status."
exit 1;
fi
confline=`cat config.status`
if [ "x$1" != "x" ]; then
what=" because $1 has changed"
fi
if [ "x$2" != "x" ]; then
srcdir="$2"
else
srcdir="."
fi
echo ""
echo "Trying to reconfigure${what}."
echo "Using config statement:"
echo "$srcdir/configure $confline"
echo ""
$srcdir/configure $confline --nohowto || exit 1
echo "Reconfigure successful."
echo "If the build fails, please run $srcdir/configure again."
echo ""
test -e Makefile && sleep 1 && touch Makefile
This diff is collapsed.
#! /bin/sh
# Put dlls into bin/, symlinking them to lib/, and create
# a symlinked import archive .dll.a in lib/.
CXX=`grep CXX config/Makefile.comp | sed 's,CXX[[:space:]]*=,,'`
args=
isdll=0
while [ "$1" != "" ]; do
case "$1" in
-o) args="$args $1"; shift;
dllname="$1"; dllbase=`basename $1`;
if [ "`echo $dllname | sed 's#^lib/.*\.dll$##'`" != "$dllname" ]; then
isdll=1
args="$args bin/$dllbase"
else
args="$args $1"
fi ;;
*) args="$args $1" ;;
esac
shift
done
#
$CXX $args \
&& ( if [ "$isdll" != "0" ]; then \
ln -sf $dllbase $dllname.a; \
ln -sf ../bin/$dllbase $dllname; \
fi )
exit $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment