[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Feature Request
From: |
Craig |
Subject: |
Feature Request |
Date: |
Fri, 10 Feb 2012 13:01:28 +0000 |
Hi,
I have stumbled upon a thread from 2009 in your archive that mentioned
.PHONY .SECONDARY targets. This would suggest I am not the only
person that requires this functionality that was removed through a fix
made to address another problem. I have a proposed solution to
reintroduce the functionality given a special target is set when a
make file is invoked:
--- remake.c 2012-02-10 11:46:56.000000000 +0000
+++ remake.c.new 2012-02-10 11:46:49.000000000 +0000
@@ -934,12 +934,13 @@
FILE_TIMESTAMP this_mtime, int *must_make_ptr)
{
struct dep *d;
+ struct file *f;
int dep_status = 0;
++depth;
start_updating (file);
- if (file->phony || !file->intermediate)
+ if ((file->phony && !(((f=lookup_file(".ALLOWPHONYSECONDARY"))!=0)
&& (f->is_target)))) || ((!file->intermediate))
{
/* If this is a non-intermediate file, update it and record
whether it is newer than THIS_MTIME. */
Essentially, I need the ability to remake file 'A' that depends on a
.SECONDARY target 'B' which is also .PHONY, where 'B' depends real
target 'C'. So why not have 'A' depend on 'C'? Well if 'C' is
remade, then the rule to make 'B' will run immediately after 'C',
which is common functionality necessary in order for 'A' to be remade
correctly. The actual dependency chain might look something like
this:
X: B
: Make X
Y: B
: Make Y
Z: B
: Make Z
.PHONY: B
.SECONDARY: B
B: C
: Setup for things that depend on C
C:
: Make C
At the moment, B will be explicitly remade regardless, because it is
phony. However, I only need to remake B if C has been remade.
Would it be possible to include the proposed solution in the next
release or something similar that reinstates this lost functionality?
Thanks
Craig
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Feature Request,
Craig <=