Improve bootstrap on UNIX. Now it bootstraps into a separate directory.
This commit is contained in:
parent
3d4230033a
commit
a8d3805ef3
|
@ -0,0 +1,57 @@
|
||||||
|
srcdir = @srcdir@/..
|
||||||
|
VPATH = @srcdir@/..
|
||||||
|
|
||||||
|
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXFLAGS = @CMAKE_ANSI_CXXFLAGS@ -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ -DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/Source
|
||||||
|
|
||||||
|
.SUFFIXES: .cxx .java .class
|
||||||
|
|
||||||
|
all: cmake
|
||||||
|
|
||||||
|
.cxx.o:
|
||||||
|
${CXX} ${CXXFLAGS} -c $< -o $@
|
||||||
|
|
||||||
|
|
||||||
|
OBJS = \
|
||||||
|
cmake.o \
|
||||||
|
cmakewizard.o \
|
||||||
|
cmakemain.o \
|
||||||
|
cmMakeDepend.o \
|
||||||
|
cmMakefile.o \
|
||||||
|
cmMakefileGenerator.o \
|
||||||
|
cmRegularExpression.o \
|
||||||
|
cmSourceFile.o \
|
||||||
|
cmSystemTools.o \
|
||||||
|
cmDirectory.o \
|
||||||
|
cmUnixMakefileGenerator.o \
|
||||||
|
cmCommands.o \
|
||||||
|
cmTarget.o \
|
||||||
|
cmCustomCommand.o \
|
||||||
|
cmCacheManager.o \
|
||||||
|
cmListFileCache.o \
|
||||||
|
cmSourceGroup.o
|
||||||
|
|
||||||
|
DEPENDS = ${CMAKE_CONFIG_DIR}/Source/cmConfigure.h
|
||||||
|
|
||||||
|
cmCollectFlags.o : $(DEPENDS)
|
||||||
|
cmake.o : $(DEPENDS)
|
||||||
|
cmakemain.o : $(DEPENDS)
|
||||||
|
cmMakeDepend.o : $(DEPENDS)
|
||||||
|
cmMakefile.o : $(DEPENDS)
|
||||||
|
cmMakefileGenerator.o : $(DEPENDS)
|
||||||
|
cmAuxSourceDirectoryCommand.o : $(DEPENDS)
|
||||||
|
cmRegularExpression.o : $(DEPENDS)
|
||||||
|
cmSourceFile.o : $(DEPENDS)
|
||||||
|
cmDirectory.o : $(DEPENDS)
|
||||||
|
cmCustomCommand.o : $(DEPENDS)
|
||||||
|
cmUnixMakefileGenerator.o : $(DEPENDS)
|
||||||
|
cmCommands.o : $(DEPENDS) $(srcdir)/*Command*.cxx
|
||||||
|
cmTarget.o : $(DEPENDS)
|
||||||
|
cmCacheManager.o : $(DEPENDS)
|
||||||
|
cmSourceGroup.o : $(DEPENDS)
|
||||||
|
|
||||||
|
|
||||||
|
cmake: ${OBJS}
|
||||||
|
${CXX} ${OBJS} ${CXXFLAGS} -o cmake
|
||||||
|
|
|
@ -1179,7 +1179,7 @@ done
|
||||||
|
|
||||||
ac_given_srcdir=$srcdir
|
ac_given_srcdir=$srcdir
|
||||||
|
|
||||||
trap 'rm -fr `echo "Source/InitialConfigureFlags.cmake Makefile Source/Makefile Source/cmConfigure.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
trap 'rm -fr `echo "Source/InitialConfigureFlags.cmake Source/bootstrap/Makefile Source/cmConfigure.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
||||||
EOF
|
EOF
|
||||||
cat >> $CONFIG_STATUS <<EOF
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
|
@ -1259,7 +1259,7 @@ EOF
|
||||||
|
|
||||||
cat >> $CONFIG_STATUS <<EOF
|
cat >> $CONFIG_STATUS <<EOF
|
||||||
|
|
||||||
CONFIG_FILES=\${CONFIG_FILES-"Source/InitialConfigureFlags.cmake Makefile Source/Makefile"}
|
CONFIG_FILES=\${CONFIG_FILES-"Source/InitialConfigureFlags.cmake Source/bootstrap/Makefile"}
|
||||||
EOF
|
EOF
|
||||||
cat >> $CONFIG_STATUS <<\EOF
|
cat >> $CONFIG_STATUS <<\EOF
|
||||||
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
||||||
|
@ -1433,8 +1433,8 @@ rm -fr confdefs* $ac_clean_files
|
||||||
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
||||||
|
|
||||||
# build cmake
|
# build cmake
|
||||||
$RUNMAKE
|
(cd Source/bootstrap; $RUNMAKE)
|
||||||
# run cmake
|
# run cmake
|
||||||
./Source/cmake $fullSrcDir
|
./Source/bootstrap/cmake $fullSrcDir
|
||||||
# run cmake depends
|
# run cmake depends
|
||||||
$RUNMAKE depend
|
$RUNMAKE depend
|
||||||
|
|
|
@ -143,10 +143,10 @@ fi
|
||||||
# find make to use to build cmake, prefer gmake
|
# find make to use to build cmake, prefer gmake
|
||||||
AC_PATH_PROGS(RUNMAKE, gmake make)
|
AC_PATH_PROGS(RUNMAKE, gmake make)
|
||||||
|
|
||||||
AC_OUTPUT(Source/InitialConfigureFlags.cmake Makefile Source/Makefile)
|
AC_OUTPUT(Source/InitialConfigureFlags.cmake Source/bootstrap/Makefile)
|
||||||
# build cmake
|
# build cmake
|
||||||
$RUNMAKE
|
(cd Source/bootstrap; $RUNMAKE)
|
||||||
# run cmake
|
# run cmake
|
||||||
./Source/cmake $fullSrcDir
|
./Source/bootstrap/cmake $fullSrcDir
|
||||||
# run cmake depends
|
# run cmake depends
|
||||||
$RUNMAKE depend
|
$RUNMAKE depend
|
||||||
|
|
Loading…
Reference in New Issue