[petsc-dev] Experimental GNU make build system
Satish Balay
balay at mcs.anl.gov
Thu May 23 12:54:56 CDT 2013
On Thu, 23 May 2013, Jed Brown wrote:
> Satish Balay <balay at mcs.anl.gov> writes:
>
> > posted to cygwin list - but there is a prior similar post. Appears to
> > be a windows process launcher issue. :(
>
> If long command-line arguments are the problem, we can use response
> files.
>
> http://gcc.gnu.org/wiki/Response_Files
>
> make-3.99.90 has a $file function that makes this convenient:
>
> diff --git i/gmakefile w/gmakefile
> index 1577acb..2dfdadd 100644
> --- i/gmakefile
> +++ w/gmakefile
> @@ -56,7 +56,9 @@ allobj := $(foreach pkg, $(pkgs), $(call concatlang,$(pkg)))
>
> # with-single-library=1 (default)
> $(libpetsc_shared) : $(allobj) | $$(@D)/.DIR
> - $(call quiet,CLINKER) -shared -o $@ $^ $(PETSC_EXTERNAL_LIB_BASIC)
> + $(file > $@.args, $^ $(PETSC_EXTERNAL_LIB_BASIC))
> + $(call quiet,CLINKER) -shared -o $@ @$@.args
> + @rm $@.args
Hm - that might mean all variants here - 'win32fe', 'ar' etc have to support the @cmdfile notation?
Since it works for 'make V=1' - perhaps we coud do something like:
if cygwin: V=1
And that might be sufficient? [it works for me]
Satish
>
> # with-single-library=0
> libpkg = $(foreach pkg, $1, $(LIBDIR)/libpetsc$(pkg).so)
>
>
>
> Now 'make-git -f gmakefile' works.
>
> git://git.savannah.gnu.org/make.git
>
> It looks like they'll ship make-4.0 soon and we can make this sequence
> optional, so you would only need make-4.0 (--download-gmake) on Windows.
>
More information about the petsc-dev
mailing list