mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 23:40:10 +08:00
35ba173387
2000-10-05 Benjamin Kosnik <bkoz@cygnus.com> * include: New directory. * include/backward: New directory. * include/bits: New directory. * include/ext: New directory. * include/std: New directory. * include/*/*: Populate. * backwards: Move to include/backwards, delete. * bits: Move to include/bits, delete. * ext: Move to include/ext, delete. * std: Move to include/std, delete. * src/complex.cc: Adjust include of mathconf. * mkc++config (BASE_H): Add include. * src/Makefile.am: Support for topleve sources include directory. (INCLUDES): Add LIBMATH_INCLUDE. * src/Makefile.in: Regenerate. * math/Makefile.am (INCLUDES): Append /include. * math/Makefile.in: Regenerate. * libio/Makefile.am (INCLUDES): Add glibcpp_includedir. * libio/Makefile.in: Regenerate. 2 From-SVN: r36725
59 lines
1.2 KiB
Bash
Executable File
59 lines
1.2 KiB
Bash
Executable File
#! /bin/sh
|
|
|
|
# 2000-02-01 bkoz
|
|
# Script to take the generated "config.h" from autoconf and make the
|
|
# macros within it namespace safe (ie wrapping them in _GLIBCPP_ so
|
|
# that "HAVE_LC_MESSAGES" becomes "_GLIBCPP_HAVE_LC_MESSAGES" etc etc.
|
|
|
|
echo "running mkc++config"
|
|
|
|
BUILD_DIR=$1
|
|
if [ ! -d "$BUILD_DIR" ]; then
|
|
echo "build directory $BUILD_DIR not found, exiting."
|
|
exit 1
|
|
fi
|
|
|
|
SRC_DIR=$2
|
|
if [ ! -d "$SRC_DIR" ]; then
|
|
echo "source directory $SRC_DIR not found, exiting."
|
|
exit 1
|
|
fi
|
|
|
|
BASE_H="$SRC_DIR/include/bits/c++config"
|
|
IN_H="$BUILD_DIR/config.h"
|
|
OUT_H="$BUILD_DIR/bits/c++config.h"
|
|
|
|
if [ ! -f $IN_H ]; then
|
|
echo "necessary file $IN_H not found, exiting"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -d "$BUILD_DIR/bits" ]; then
|
|
mkdir "$BUILD_DIR/bits"
|
|
fi
|
|
|
|
|
|
# Part 1
|
|
# sed config.h from autoconf and make it namespace safe.
|
|
sed 's/HAVE_/_GLIBCPP_HAVE_/g' < $IN_H > temp-1
|
|
sed 's/PACKAGE/_GLIBCPP_PACKAGE/g' < temp-1 > temp-2
|
|
sed 's/VERSION/_GLIBCPP_VERSION/g' < temp-2 > temp-3
|
|
sed 's/WORDS_/_GLIBCPP_WORDS_/g' < temp-3 > temp-4
|
|
|
|
|
|
# Part 2
|
|
# cat this into generated bits/c++config.h
|
|
cat $BASE_H temp-4 > $OUT_H
|
|
rm temp-1 temp-2 temp-3 temp-4
|
|
|
|
|
|
# Part 3
|
|
# complete macro guards for resulting file
|
|
cat <<EOF >> $OUT_H
|
|
|
|
#endif // _CPP_CPPCONFIG_
|
|
EOF
|
|
|
|
exit 0
|
|
|