[petsc-dev] making make cmake less verbose
Satish Balay
balay at mcs.anl.gov
Thu Dec 13 15:37:46 CST 2012
On Thu, 13 Dec 2012, Barry Smith wrote:
>
>
> On Dec 13, 2012, at 3:18 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> > It is displaying all the debugging information. You'll only get the useful information if you run this:
> >
> > make -j5 -C arch-gnu
>
> Yes, your suggestion is not verbose because it doesn't do anything
>
> Barrys-MacBook-Pro:tutorials barrysmith$ make -j5 -C arch-gnu
> make: *** arch-gnu: No such file or directory. Stop.
> Barrys-MacBook-Pro:tutorials barrysmith$ pwd
> /Users/barrysmith/Src/petsc-dev/src/snes/examples/tutorials
>
> I don't want a "clean" top-level only command, like make cmake I want to run this command from whatever directory I am in and have it work correctly.
>
> I guess I'll just add the rule ccmake: pushd ${PETSC_DIR} ; make -j5 -C ${PETSC_ARCH}; popd in the conf/rules makefile, would that be reasonable?
Looks like the primary issue here is the extra option to make
'VERBOSE=1' in the taret 'cmake'. And this is there primarily for the
top level make target to gather details into make.log
How about the following?
Satish
-------
asterix:/home/balay/spetsc>hg diff
diff --git a/conf/rules b/conf/rules
--- a/conf/rules
+++ b/conf/rules
@@ -85,7 +85,7 @@
cmake: chk_makej
@echo "Building PETSc using CMake with ${MAKE_NP} build threads"
@echo "=========================================="
- @cd ${PETSC_DIR}/${PETSC_ARCH} && ${OMAKE} -j ${MAKE_NP} VERBOSE=1
+ @cd ${PETSC_DIR}/${PETSC_ARCH} && ${OMAKE} -j ${MAKE_NP} VERBOSE=${VERBOSE}
@if [ "${BUILDSHAREDLIB}" = "yes" -a "${DSYMUTIL}" != "true" ]; then \
echo "Running ${DSYMUTIL} on ${SHLIBS}";\
for LIBNAME in ${SHLIBS}; do ${DSYMUTIL} ${INSTALL_LIB_DIR}/$$LIBNAME.${SL_LINKER_SUFFIX}; done; fi
diff --git a/makefile b/makefile
--- a/makefile
+++ b/makefile
@@ -24,7 +24,7 @@
@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} chkpetsc_dir petscnagupgrade | tee ${PETSC_ARCH}/conf/make.log
@ln -sf ${PETSC_ARCH}/conf/make.log make.log
@if [ "${PETSC_BUILD_USING_CMAKE}" != "" ]; then \
- ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} all-cmake 2>&1 | tee -a ${PETSC_ARCH}/conf/make.log \
+ ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} all-cmake VERBOSE=1 2>&1 | tee -a ${PETSC_ARCH}/conf/make.log \
| egrep -v '( --check-build-system |cmake -E | -o CMakeFiles/petsc[[:lower:]]*.dir/| -o lib/libpetsc|CMakeFiles/petsc[[:lower:]]*\.dir/(build|depend|requires)|-f CMakeFiles/Makefile2|Dependee .* is newer than depender |provides\.build. is up to date)'; \
else \
${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} all-legacy 2>&1 | tee -a ${PETSC_ARCH}/conf/make.log \
asterix:/home/balay/spetsc>
More information about the petsc-dev
mailing list