summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-05-02 08:46:20 -0400
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-05-02 08:46:20 -0400
commita8d3805ef396b5a3f75eb851ba3a976274121836 (patch)
tree767b6fe78982ebb9505b1b615627ece115e99e74
parent3d4230033ad4eae858c2fd3400e0d7bf8007d1a8 (diff)
downloadcmake-a8d3805ef396b5a3f75eb851ba3a976274121836.tar.gz
Improve bootstrap on UNIX. Now it bootstraps into a separate directory.
-rw-r--r--Source/bootstrap/Makefile.in57
-rwxr-xr-xconfigure8
-rw-r--r--configure.in6
3 files changed, 64 insertions, 7 deletions
diff --git a/Source/bootstrap/Makefile.in b/Source/bootstrap/Makefile.in
new file mode 100644
index 0000000000..a7d473712f
--- /dev/null
+++ b/Source/bootstrap/Makefile.in
@@ -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
+
diff --git a/configure b/configure
index b3817bd490..7e64c1ec64 100755
--- a/configure
+++ b/configure
@@ -1179,7 +1179,7 @@ done
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
cat >> $CONFIG_STATUS <<EOF
@@ -1259,7 +1259,7 @@ 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
cat >> $CONFIG_STATUS <<\EOF
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
# build cmake
-$RUNMAKE
+(cd Source/bootstrap; $RUNMAKE)
# run cmake
-./Source/cmake $fullSrcDir
+./Source/bootstrap/cmake $fullSrcDir
# run cmake depends
$RUNMAKE depend
diff --git a/configure.in b/configure.in
index 8478af2425..16fcbd567a 100644
--- a/configure.in
+++ b/configure.in
@@ -143,10 +143,10 @@ fi
# find make to use to build cmake, prefer gmake
AC_PATH_PROGS(RUNMAKE, gmake make)
-AC_OUTPUT(Source/InitialConfigureFlags.cmake Makefile Source/Makefile)
+AC_OUTPUT(Source/InitialConfigureFlags.cmake Source/bootstrap/Makefile)
# build cmake
-$RUNMAKE
+(cd Source/bootstrap; $RUNMAKE)
# run cmake
-./Source/cmake $fullSrcDir
+./Source/bootstrap/cmake $fullSrcDir
# run cmake depends
$RUNMAKE depend