Re: Makefile for parser
От | Peter Eisentraut |
---|---|
Тема | Re: Makefile for parser |
Дата | |
Msg-id | Pine.LNX.4.21.0007021316130.351-100000@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: Makefile for parser (Chris Bitmead <chris@bitmead.com>) |
Список | pgsql-hackers |
Chris Bitmead writes: > Certainly the pgsql makefiles are broken for parallel make. I think of "broken" for parallel make if it doesn't work at all, which certainly needs to be fixed. "Unsupportive" of parallel make are things like this: DIRS := initdb initlocation ipcclean pg_ctl pg_dump pg_id \ pg_passwd pg_version psql scripts all: @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit 1; done because no matter how smart make is, the loop will still execute sequentially. But parallel make can co-exist with recursive make, like this: DIRS := initdb initlocation ipcclean pg_ctl pg_dump pg_id \ pg_passwd pg_version psql scripts all: $(DIRS:%=%-all-recursive) .PHONY: $(DIRS:%=%-all-recursive) $(DIRS:%=%-all-recursive):$(MAKE) -C $(subst -all-recursive,,$@) all Then again, if you want faster builds, use -pipe. I'd like to make that the default but I haven't found a reliable way to test for it. GCC doesn't reject invalid switches in a detectable manner. -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
В списке pgsql-hackers по дате отправления: