Skip site navigation (1) Skip section navigation (2)

Re: Change draft gmake control

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-docs(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Change draft gmake control
Date: 2007-01-27 15:14:33
Message-ID: 200701271514.l0RFEXK19056@momjian.us (view raw or flat)
Thread:
Lists: pgsql-docspgsql-patches
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > I had to change the draft flag for SGML from 'gmake draft html' to
> > 'gmake DRAFT=Y html'.  Internally the code used to recurse with
> > DRAFT=Y, but I found there is no way to exit the makefile after the
> > recursion returned,
> 
> exit 0 ?

I tried that, but it did nothing.  Of course exit 1 works, but throws an
error, and exec exit 0 doesn't work either, throws an error.

> > so I had to use this new syntax.  Though more 
> > cumbersome, it is more logical because DRAFT is really a modifier,
> > not a rule itself. For example, 'gmake html draft' would never have
> > worked.
> 
> What would have been the meaning of that command?

Nothing, but the point is that draft is a modifier and it isn't clear
from that syntax that draft is a modifier and not a target.

> Anyway, certainly you could write this to preserve the target:
> 
> draft:
> 	$(MAKE) html DRAFT=Y

The problem is that the 'gmake' recursion is done, but then returns and
runs the hhml again, so 'gmake draft html' calls "$(MAKE) html DRAFT=Y"
and on return from that, the html is called again and rebuilds, so it
isn't really draft.

-- 
  Bruce Momjian   bruce(at)momjian(dot)us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

Responses

pgsql-docs by date

Next:From: Peter EisentrautDate: 2007-01-27 16:28:03
Subject: Re: Change draft gmake control
Previous:From: Peter EisentrautDate: 2007-01-27 09:46:11
Subject: Re: Change draft gmake control

pgsql-patches by date

Next:From: Tom LaneDate: 2007-01-27 16:16:01
Subject: Re: Ctid chain following enhancement
Previous:From: Peter EisentrautDate: 2007-01-27 09:46:11
Subject: Re: Change draft gmake control

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group