Browse Source

ENH: fix for SGI make

Bill Hoffman 25 years ago
parent
commit
e06a538a30
3 changed files with 14 additions and 17 deletions
  1. 5 14
      CMakeRules.make.in
  2. 1 2
      Source/Makefile.in
  3. 8 1
      Source/cmUnixMakefile.cxx

+ 5 - 14
CMakeRules.make.in

@@ -1,21 +1,12 @@
-# set up make suffixes
-
-.SUFFIXES: .cxx .java .class
-
-#------------------------------------------------------------------------------
-# rules for building .o files from source files
-
-.c.o:
-	${CC} ${CC_FLAGS} -c $< -o $@
-.cxx.o:
-	${CXX} ${CXX_FLAGS} -c $< -o $@
+# include simple rules for building .o files
+@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMake/CMakeSimpleRules.make@MAKEQUOTE@
 
 #
-# Makefile for Visualization Toolkit sources. 
+# Makefile for 
 # 
 #------------------------------------------------------------------------------
 #
-all: ${OBJ_SUB_DIRS} ${EXECUTABLES} ${SUBDIR_BUILD} ${BUILD_LIB_FILE} ${LOCAL_BUILD_TARGETS} 
+all: CMakeTargets.make ${OBJ_SUB_DIRS} ${EXECUTABLES} ${SUBDIR_BUILD} ${BUILD_LIB_FILE} ${LOCAL_BUILD_TARGETS} ${CMAKE} 
 
 #------------------------------------------------------------------------------
 
@@ -27,7 +18,7 @@ depend: ${CMAKE}
 
 
 clean: ${SUBDIR_CLEAN}
-	rm -f ${SRC_OBJ} ${ITK_EXECUTABLES} 
+	rm -f ${SRC_OBJ} ${EXECUTABLES} 
 
 CMakeTargets.make: ${CMAKE} ${srcdir}/CMakeLists.txt
 	${CMAKE} ${srcdir}/CMakeLists.txt -S${srcdir} -I${srcdir} ${INCLUDE_FLAGS}

+ 1 - 2
Source/Makefile.in

@@ -6,9 +6,8 @@ VPATH         = @srcdir@
 # This will cause an infinite loop as it will add the
 # rule for changing into this directory
 
-@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMake/CMakeRules.make@MAKEQUOTE@
-CMAKE =
 @MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMake/CMakeVariables.make@MAKEQUOTE@
+@MAKEINCLUDE@ @MAKEQUOTE@@CMAKE_OBJ_DIR@/CMake/CMakeSimpleRules.make@MAKEQUOTE@
 
 OBJS = \
 cmClassFile.o \

+ 8 - 1
Source/cmUnixMakefile.cxx

@@ -107,7 +107,12 @@ void cmUnixMakefile::OutputMakefile(const char* file)
       {
       if(!m_Classes[i].m_AbstractClass && !m_Classes[i].m_HeaderFileOnly)
 	{ 
-        fout << m_Classes[i].m_ClassName << " \\\n";
+        fout << m_Classes[i].m_ClassName;
+	if(i < m_Classes.size()-1)
+	  {
+	    fout << " \\";
+	  }
+	fout << "\n";
 	}
       }
     fout << "\n";
@@ -152,6 +157,8 @@ void cmUnixMakefile::OutputMakefile(const char* file)
       {
       std::string subdir = FixDirectoryName(m_SubDirectories[i].c_str());
       fout << "build_" << subdir.c_str() << ":\n";
+      fout << "\tcd " << m_SubDirectories[i].c_str()
+	   << "; ${MAKE} -${MAKEFLAGS} CMakeTargets.make\n";
       fout << "\tcd " << m_SubDirectories[i].c_str()
 	   << "; ${MAKE} -${MAKEFLAGS} all\n\n";