[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mingw-msys] RE: Differences between mingw-make and msys' make
From: |
Greg Chicares |
Subject: |
Re: [Mingw-msys] RE: Differences between mingw-make and msys' make |
Date: |
Tue, 24 Sep 2002 22:36:15 -0400 |
Earnie Boyd wrote:
>
> Soren A wrote:
> >
> > > (2) The error:
> > > make[1]: Entering directory
> > > `/k/WinNT_sees_now/tmpbuilddir/gmakes/make-3.80rc2_build' gcc
[snip many defines and flags]
> > > -c -o w32misc.o
> > > w32/subproc/misc.c gcc.exe: w32/subproc/misc.c: No such file or
> > > directory gcc.exe: No input files
> > > make[1]: *** [w32misc.o] Error 1
> > >
> > > Analysis: This rule wasn't written in the best way. To keep this build
> > > portable and GNU-proper all rules must allow building outside the
> > > source dir (which I generally do but I think John, you may not have
> > > been). The way I know how to fix this is to rewrite the rule like
> > > this:
> > >
> > > w32misc.o: w32/subproc/misc.c
> > > $(COMPILE) -c -o w32misc.o $<
> >
> > CORRECTION: GNU does not recommend this -- this is wrong (my fix was
> > wrong). Some 'make' programs won't do this right. It should be,
> > instead:
> >
> > loadavg.c: $(srcdir)/getloadavg.c
> > cp $(srcdir)/getloadavg.c $@
> >
> > > Which then finds the .c file because the top of the makefile has the
> > > src dir in VPATH.
>
> If you're concerned with a portable Makefile, VPATH shouldn't be used
> either. :)
I assume you mean that VPATH's directory separator
is a semicolon for windows, but a colon otherwise.
But you can work around that by using vpath, e.g.
vpath % $(srcdir)
vpath % $(extra_path_0)
vpath % $(extra_path_1)
instead of
VPATH = $(srcdir);$(extra_path_0);$(extra_path_1)