[petsc-dev] Cleaning with gnumake

Satish Balay balay at mcs.anl.gov
Tue Oct 22 10:24:35 CDT 2013


On Tue, 22 Oct 2013, Satish Balay wrote:

> On Tue, 22 Oct 2013, Jed Brown wrote:
> 
> > The gnumake target deletes the object directories and libraries, but
> > it's not reachable through the front-end makefile.  Which target should
> > we put it under?  I don't want to need "make allclean" because that
> > takes several seconds to walk through the entire tree.
> 
> We hardly use it now - but I think 'make allclean' should be modified
> to do the appropriate thing for for each of the builds:
> legacy/cmake/gmake [similar to 'make all']

perhaps the following change?

Satish

-----------------
$ git diff
diff --git a/makefile b/makefile
index a83e810..65c5026 100644
--- a/makefile
+++ b/makefile
@@ -216,8 +216,17 @@ deletemods: chk_makej
        -${RM} -f ${PETSC_DIR}/${PETSC_ARCH}/include/petsc*.mod
 
 # Cleans up build
-allclean: deletelibs deletemods
+allclean-legacy: deletelibs deletemods
        -@${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} ACTION=clean tree
+
+allclean:
+       @if [ "${MAKE_IS_GNUMAKE}" != "" ]; then \
+         ${OMAKE} -f gmakefile clean; \
+       elif [ "${PETSC_BUILD_USING_CMAKE}" != "" ]; then \
+         ${OMAKE} -f ${PETSC_ARCH}/Makefile clean; \
+       else \
+          ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} allclean-legacy; \
+       fi
 #
 reconfigure:
        @${PYTHON} ${PETSC_ARCH}/conf/reconfigure-${PETSC_ARCH}.py



More information about the petsc-dev mailing list