[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: this is embarrasing... prerequisiste gets updated, but make still sa
From: |
Michael Ludwig |
Subject: |
Re: this is embarrasing... prerequisiste gets updated, but make still says it is older than target |
Date: |
Mon, 2 Apr 2012 19:31:03 +0200 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
Paul Smith schrieb am 02.04.2012 um 10:09 (-0400):
> You still haven't described what you're trying to do. However, I'll
> say that _probably_ the way to solve your problem is to go back to the
> original attempt, with the phony prerequisite, and just add an empty
> rule to foobar1:
>
> > > foobar: foobar1
> > > touch $@
> > >
> > > foobar1: foobar_phony
> > >
> > > .PHONY: foobar_phony
> > > foobar_phony:
> > > touch foobar1
>
> Change the rule for foobar1 so there's a recipe there, even a "do
> nothing" recipe:
>
> foobar1: foobar_phony
> @:
>
> Now that make has a recipe that could potentially create foobar1 it
> will need to re-check the timestamp on foobar1. It was only because
> there was no recipe for building foobar1, that make decided there was
> no way the timestamp on foobar1 could have changed and so it didn't
> re-check it.
But are phony targets meant to update real targets? Wouldn't it be more
make-like to have foobar1 depend on a non-phony target (some file, like
barbar) that might in fact be updated and so, in turn, trigger an update
of foobar1?
foobar: foobar1
touch $@
foobar1: barbar
touch $@
barbar:
echo "I might be changing lots of things!"
perl barbar.pl >> barbar.log
if [ $(cat barbar.log | wc -l) -gt 20 ]; then
cp barbar.log $@
rm barbar.log
fi
Michael
- Re: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, (continued)
- RE: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Mark Galeck (CW), 2012/04/02
- RE: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Mark Galeck (CW), 2012/04/02
- RE: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Paul Smith, 2012/04/02
- RE: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Mark Galeck (CW), 2012/04/02
- RE: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Mark Galeck (CW), 2012/04/02
- RE: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Mark Galeck (CW), 2012/04/02
- Re: this is embarrasing... prerequisiste gets updated, but make still says it is older than target,
Michael Ludwig <=
- Re: this is embarrasing... prerequisiste gets updated, but make still says it is older than target, Michael Ludwig, 2012/04/02