[petsc-dev] Experimental GNU make build system

Jed Brown jedbrown at mcs.anl.gov
Thu May 23 15:32:34 CDT 2013


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__.



More information about the petsc-dev mailing list