On Tue, 22 Oct 2013, Satish Balay wrote:

> 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?

this should work for all cases.. [assuming 'clean' is the appropriate cmake 
target aswell]

Satish

-------

$ git diff
diff --git a/makefile b/makefile
index a83e810..97e674b 100644
--- a/makefile
+++ b/makefile
@@ -216,8 +216,21 @@ 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-cmake:
+       -@cd ${PETSC_ARCH} && ${OMAKE} clean
+allclean-gnumake:
+       -@${OMAKE} -f gmakefile clean
+
+allclean:
+       @if [ "${MAKE_IS_GNUMAKE}" != "" ]; then \
+          ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} 
allclean-gnumake; \
+       elif [ "${PETSC_BUILD_USING_CMAKE}" != "" ]; then \
+          ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} 
allclean-cmake; \
+       else \
+          ${OMAKE} PETSC_ARCH=${PETSC_ARCH} PETSC_DIR=${PETSC_DIR} 
allclean-legacy; \
+       fi
 #
 reconfigure:
        @${PYTHON} ${PETSC_ARCH}/conf/reconfigure-${PETSC_ARCH}.py

Reply via email to