[petsc-dev] Experimental GNU make build system

Satish Balay balay at mcs.anl.gov
Tue Jun 4 13:53:01 CDT 2013


On Mon, 3 Jun 2013, Satish Balay wrote:

> On Mon, 3 Jun 2013, Jed Brown wrote:
> 
> > Satish Balay <balay at mcs.anl.gov> writes:
> > 
> > > Perhaps we should split up AR command into multiple invocations? [for windows?]
> > 
> > We discussed this earlier in this thread [1]:
> > 
> > http://mail-archive.com/search?l=mid&q=87bo81sjsr.fsf@mcs.anl.gov
> > 
> > I prefer response files to incremental AR because response files also
> > work for shared libraries.
> 
> Win32fe isn't handling response files - so I think its easier to have
> conf/gmakegen.py split up the archiver into multiple invocations for
> windows/win32fe usage - than fix win32fe. [since we are planing on
> eliminating win32fe anyway]

ok - the following works.

To use full path names [or long file names] with '$@.args' - we'll
have to fix win32fe to do the cygwin-to-dos path converstion for all
'@' options.

Also - I don't think we can't rely on $(file) from gnu-make-4

Satish

------------
balay at msnehalem2 ~/petsc.clone
$ git diff gmakefile
diff --git a/gmakefile b/gmakefile
index bf9ce21..3590698 100644
--- a/gmakefile
+++ b/gmakefile
@@ -69,8 +69,10 @@ $(libpetsc_static) : obj := $(srcs.o)

 %.$(AR_LIB_SUFFIX) : $$(obj) | $$(@D)/.DIR
        @$(RM) $@
-       $(call quiet,AR) $(AR_FLAGS) $@ $^
+       @printf "$^" > ar.args
+       $(call quiet,AR) $(AR_FLAGS) $@ @ar.args
        $(call quiet,RANLIB) $@
+       @$(RM) ar.args

 # with-single-library=0
 libpkg = $(foreach pkg, $1, $(LIBDIR)/libpetsc$(pkg).so)

balay at msnehalem2 ~/petsc.clone
$ make -f gmakefile PETSC_ARCH=arch-cmplx -j 20 V=1
/home/balay/petsc.clone/bin/win32fe/win32fe lib -a /home/balay/petsc.clone/arch-cmplx/lib/libpetsc.lib @ar.args
kspams.o : warning LNK4221: no public symbols found; archive member will be inaccessible
/usr/bin/true /home/balay/petsc.clone/arch-cmplx/lib/libpetsc.lib

balay at msnehalem2 ~/petsc.clone
$ make PETSC_ARCH=arch-cmplx test
Running test examples to verify correct installation
Using PETSC_DIR=/home/balay/petsc.clone and PETSC_ARCH=arch-cmplx
C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1 MPI process
Fortran example src/snes/examples/tutorials/ex5f run successfully with 1 MPI process
Completed test examples




More information about the petsc-dev mailing list