bug-make
[Top][All Lists]
Advanced

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

separate the notions of always-build and jobserver


From: Ralf Wildenhues
Subject: separate the notions of always-build and jobserver
Date: Tue, 28 Sep 2010 22:55:49 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Currently, 'make -n' only executes recipe commands prefixed with '+' or
containing one of the strings ${MAKE} or $(MAKE).  Likewise, parallel
make hands the jobserver file descriptors only to rules annotated in the
same way.

It would be nice if these two semantics could be decoupled.

1) The GCC LTO (link-time optimization) engine may exploit
parallelization during whole-program linking by hooking into the job
server: http://gcc.gnu.org/ml/gcc-patches/2010-08/msg02149.html

2) Autoconf's Autotest testsuites could hook into the jobserver:
http://lists.gnu.org/archive/html/autoconf-patches/2008-05/msg00028.html
(this patch hasn't made it into Autoconf, but the './testsuite --jobs'
patches have).

I can imagine more use cases, where one doesn't want 'make -n' to
actually execute the code in question, but it would be nice to be able
to hook into the jobserver when not dry running.

Of course, that means the jobserver semantics should be documented and
treated as API.

One question is whether

- jobserver file descriptors should just be passed on to every process
(could be dangerous when passed to processes not expecting it, or
otherwise messing with it in bad ways), or

- there should be a new annotation for such recipe commands.  For
example, leading '&' or '|' would be quite unlikely to occur in current
makefiles, thus be possible as recipe modifiers, although the pipe
symbol could be confused with order-only functionality.

What do you think?

Thanks,
Ralf



reply via email to

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