Browse Source

Do not run make from super-configure, rather write a Makefile

Samuel Thibault 12 years ago
parent
commit
809bfb3524
2 changed files with 24 additions and 13 deletions
  1. 3 2
      doc/chapters/mic-scc-support.texi
  2. 21 11
      super-configure

+ 3 - 2
doc/chapters/mic-scc-support.texi

@@ -10,8 +10,9 @@ SCC support just needs the presence of the RCCE library.
 
 
 MIC support actually needs two compilations of StarPU, one for the host and one for
 MIC support actually needs two compilations of StarPU, one for the host and one for
 the device. The @code{super-configure} script can be used to achieve this: it basically
 the device. The @code{super-configure} script can be used to achieve this: it basically
-calls @code{configure} from @code{build_mic} and @code{build_host}, then @code{make} and
-@code{make install}.
+calls @code{configure} as appropriate from two new directories: @code{build_mic} and
+@code{build_host}. @code{make} and @code{make install} can then be used as usual and will
+recurse into both directories.
 
 
 @c TODO: move to configuration section ?
 @c TODO: move to configuration section ?
 
 

+ 21 - 11
super-configure

@@ -58,18 +58,28 @@ do
 	else
 	else
 		$command
 		$command
 	fi
 	fi
-	make -j
-
-	if test x$arch = xmic ; then
-		make check > /dev/null 2&>1
+	if [ "$?" != 0 ]
+	then
+		exit $?
 	fi
 	fi
-
-	make install
 	cd "${ROOT_DIR}"
 	cd "${ROOT_DIR}"
-
 done
 done
 
 
-if [ ! -e "${prefix}/mic/lib/pkgconfig/starpu-1.2-mic.pc" ]
-then
-	ln -s "${prefix}/mic/lib/pkgconfig/starpu-1.2.pc" "${prefix}/mic/lib/pkgconfig/starpu-1.2-mic.pc"
-fi
+cat > Makefile << EOF
+all:
+	\$(MAKE) -C build_mic
+	\$(MAKE) -C build_host
+
+clean:
+	\$(MAKE) -C build_mic clean
+	\$(MAKE) -C build_host clean
+	rm -f Makefile
+
+check:
+	\$(MAKE) -C build_mic check
+
+install:
+	\$(MAKE) -C build_mic install
+	\$(MAKE) -C build_host install
+	ln -sf "${prefix}/mic/lib/pkgconfig/starpu-1.2.pc" "${prefix}/mic/lib/pkgconfig/starpu-1.2-mic.pc"
+EOF