[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Solaris make and VPATH (was: parallel build of gettext may fail)

From: Bruno Haible
Subject: Re: Solaris make and VPATH (was: parallel build of gettext may fail)
Date: Tue, 31 Oct 2006 14:21:54 +0100
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> > Btw, can you reproduce this rewriting of variables in Solaris 'make'?
> mkdir src build
> touch src/a src/b src/c
> cd build
> tr X '\t' >Makefile <<\EOF
> VPATH = ../src
> F = a b c
> d: $(F)
> address@hidden "The first and last are not VPATH-rewritten, because"
> address@hidden "after make expands $$(F), the \"make words\" are not 
> completely"
> address@hidden "surrounded by white space: '$(F)'"
> address@hidden "compare with: $(F), or $(F) or :$(F) ..."
> /usr/ccs/bin/make

Thanks. Perfectly reproducible. It's even weirder than I thought: it applies
the expansion only to some elements of the macro expansion, not to all!

> ... so there is no
> mistaken belief that this only happens with macro expansion:
>  | but it really is ../src/a scary feature...

Ouch. Really, that is one of these quick hacks that in the long run are seen
as bugs, not as festures.

> I understand if you don't want to support
> it, I'm merely trying to point out that you _can_ do it.

But at which cost? In gettext I have ca. 30 Makefile.ams with more than 1000
variables. Support for Solaris VPATH would imply checking each of the variables
and its uses. Even simple rules like

        for file in $(man_HTML); do \
          $(RM) $(DESTDIR)$(htmldir)/$$file; \

require modifications so that they work with Solaris VPATH. And the addition
of a new file in a source directory can break Solaris 'make' if it's called
'test', 'for' or similar.

Some SGI employees, around 1997, were honest enough to say that were using
GNU make internally inside SGI instead of IRIX make. I wouldn't be surprised
if Sun employees do the same, even if they don't say it publicly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]