On 02/28/2013 09:57 AM, Benjamin Franksen wrote:
On Thursday, February 28, 2013 09:41:14 Michael Davidsaver wrote:
Makefiles are so much fun...
If you don't like creating marker files (which must be cleaned) you can
also do:
one two three: create_some_files.pl
./create_some_files.pl
three: two
two: one
This creates a dependency chain forcing sequential execution.
Yes, but...
(1) The script can be called more often than necessary:
I don't think this is the case as long as the command
'./create_some_files.pl' creates all three files (which I assume it what
you intended).
It is my understanding that the existence and timestamp of the target
file are checked immediately after all dependent rules have run, and not
when the dependency tree is computed. This is why these rules work when
with '-j1'.
(2) Getting the additional sequentializing dependencies right is harder and
the result less obvious.
I certainly can't argue with this.
Again, think of a generated list of many, many files
(in our case the script creates 692 targets).
Wow. I agree that what I describe would not scale to this. I've
typically used this for code generators which produce two or three
output files.
- Replies:
- Re: What I learned today... Andrew Johnson
- Re: What I learned today... Benjamin Franksen
- References:
- What I learned today... Benjamin Franksen
- Re: What I learned today... Michael Davidsaver
- Re: What I learned today... Benjamin Franksen
- Navigate by Date:
- Prev:
JCA Error Lucas José
- Next:
RE: JCA Error Mark Rivers
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: What I learned today... Benjamin Franksen
- Next:
Re: What I learned today... Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|