Parallel make failure with gnutls-3.0.12

Eli Zaretskii eliz at gnu.org
Sun Jan 22 07:01:20 CET 2012


> Date: Sat, 21 Jan 2012 23:21:20 +0100
> From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
> Cc: ktk at enterprise.bidmc.harvard.edu, a.radke at arcor.de, gnutls-devel at gnu.org
> 
> On Sat, Jan 21, 2012 at 10:19 PM, Eli Zaretskii <eliz at gnu.org> wrote:
> 
> >> +.NOTPARALLEL: $(ENUMS) enums.texi
> >> +
> >>  $(ENUMS): enums.texi
> >>       $(MAKE) compare-makefile
> >>       -mkdir enums
> > ".NOTPARALLEL" is specific to GNU Make.
> 
> Isn't parallel building also GNU make specific? :)

No.  At least Sun's make can do parallel builds as well.

> Otherwise do you know a portable way for that?

Well, I don't really understand the compare-makefile trick.  What is
its purpose, exactly?  It seems to have no side effects except,
potentially, the exit status returned by Diff, but if the exit status
is the sole purpose, I don't see how that status is being used.

Anyway, one solution would be to change this:

	$(MAKE) compare-makefile

into this:

     $(MAKE) compare-makefile ARG=$@

and in the compare-makefile target change each occurrence of tmp-$@
into tmp-$@.$(ARG) or some such, thus using a different temporary file
for each member of $(ENUMS).

But it is better to fix the $(ENUMS) target rule in the first place.
The split-texi.pl script generates all the files in $(ENUMS) in one
go, right?  If so, that rule needs to be run only once, while as
things are set up now, we tell Make that _each_ file in $(ENUMS) is to
be generated _independently_ from enums.texi, which is not what you
want.

Would something like the below do the job better?

$(ENUMS): stamp_enums

stamp_enums: enums.texi
	$(MAKE) compare-makefile
	-mkdir enums
	$(srcdir)/scripts/split-texi.pl enums enum < enums.texi
	echo $@ > $@

Am I missing something?




More information about the Gnutls-devel mailing list