Hi Akim. On 06/15/2012 11:24 AM, Akim Demaille wrote: > > Le 15 juin 2012 à 00:05, Stefano Lattarini a écrit : > >> +.PHONY: all all-am all-local >> +ifdef SUBDIRS > > Sometimes you using ifdef, and sometimes ifeq "". Are they equivalent? > AFAIU, these are equivalent:
ifdef VAR ifneq "$(VAR)" "" But of course, there no way to express something like this with ifdef: ifneq "$(VAR-1)$(VAR-2)" "" >> +ifeq ($(strip %LOCAL-HEADERS% $(BUILT_SOURCES)),) >> +all: $(if $(SUBDIRS),all-recursive,all-am) >> +else >> +all: %LOCAL-HEADERS% $(BUILT_SOURCES) >> + $(MAKE) $(if $(SUBDIRS),all-recursive,all-am) >> +endif > > There's no way to avoid forking another Make here? > So far I've found no natural way (note that such a fork is there also in mainline Automake, so this is not a performance regression at least). The problem is that all $(BUILT_SOURCES) must be created before we run any of all-recursive, all-am, or *any of their prerequisites*. I don't know whether there is any natural way to accomplish that with GNU make. Any suggestion? > >> am__mkdir = test -d $1 || $(MKDIR_P) $1 > > Is the "test" really needed? "mkdir -p /already/exists" should silently > exit 0, shouldn't it? > Yes, but then it would cause an extra fork even if the target directory already exists. I reckon that would quite displease our Cygwin users ;-) > > Thorough testing, as usual :) > Thanks. I understand this is an ACK then? Regards, Stefano
