[petsc-dev] Experimental GNU make build system

Satish Balay balay at mcs.anl.gov
Thu May 23 15:43:36 CDT 2013


On Thu, 23 May 2013, Jed Brown wrote:

> Satish Balay <balay at mcs.anl.gov> writes:
> 
> > Any idea why this redirection from PetscStringize() -> PetscStringizeArg() was needed?
> >
> > https://bitbucket.org/petsc/petsc/commits/59aaf35543f238554406f60a2c099071dfa3cd67
> >
> > This breaks on windows when empty 'LOCDIR' is used with -D__INSDIR__=${LOCDIR}
> > [but reverting the above gets the compile going.]
> 
> 
> #define PetscStringizeArg(a) #a
> #define PetscStringize(a) PetscStringizeArg(a)
> #define __SDIR__ PetscStringize(__INSDIR__)
> 
> 
> We want __INSDIR__ to be expanded.
> 
> > /home/balay/petsc.clone/bin/win32fe/win32fe cl -c -MT -wd4996 -Z7   -I/home/balay/petsc.clone/include -I/home/balay/petsc.clone/arch-gmake/include -I/cygdrive/c/Program\
> > Files/Microsoft\ HPC\ Pack\ 2012/Inc    -D__INSDIR__=  src/sys/info/verboseinfo.c -o arch-gmake/obj-gmake/src/sys/info/verboseinfo.o
> > verboseinfo.c
> > C:\cygwin\home\balay\PETSC~1.CLO\include\petsclog.h(202) : warning C4003: not enough actual parameters for macro 'PetscStringizeArg'
> 
> Looks like ${LOCDIR} is empty.
> 
> I think we should get rid of __SDIR__ entirely and just pass the full
> path to the source file so that it goes into __FILE__.

__SDIR__ is primarily needed by 'all-legacy'. cmake/gmake builds are
using the full paths at compile time - so they don't need it [and are
using empty LOCDIR]

Hopefully we can eliminate 'all-legacy' with 'gmake' - so perhaps its
ok to remove __SDIR__ entirely

Satish



More information about the petsc-dev mailing list