Closed
Bug 414414
Opened 18 years ago
Closed 18 years ago
We shouldn't have a rule to mkdir camino/generated
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.6
People
(Reporter: mark, Assigned: mark)
Details
(Keywords: fixed1.8.1.12)
Attachments
(2 files)
|
3.88 KB,
patch
|
alqahira
:
review+
|
Details | Diff | Splinter Review |
|
3.50 KB,
patch
|
Details | Diff | Splinter Review |
We currently have a "generated" dependency whose rule looks like this:
generated:
mkdir -p $@
Targets for things that live in generated depend on generated. This is bad, because as new files are added to generated, its timestamp will be updated. On a subsequent make run, earlier targets that depend on generated will be forced to be remade because generated's timestamp is newer, even though there's really no reason to remake the target.
An example may be clearer. Consider this Makefile:
--
all: generated/f1 generated/f2
clean:
rm -rf generated
generated:
mkdir -p $@
generated/f1: generated
touch $@
sleep 1
generated/f2: generated
touch $@
--
The first time make is run, this output is produced:
--
mkdir -p generated # all depends on f1, which depends on generated
touch generated/f1
sleep 1 # insert a delay to make sure the timestamps are distinct
touch generated/f2 # generated is up-to-date (it exists), so just make f2
# side effect: the generated dir's timestamp is updated
# because the f2 file is created therein
--
Now, the second time make is run:
--
touch generated/f1
sleep 1
--
Oops. f1 has an older timestamp than generated, so it appears as though a dependency has changed. As a result, it's remade.
In camino/Makefile.in, almost all of the targets that are placed in generated currently also do "mkdir -p $(dir $@)". Since we do this, the generated target is extraneous. We should fix the few remaining targets that don't do this mkdir, and get rid of the generated target entirely.
| Assignee | ||
Comment 1•18 years ago
|
||
This also gets rid of the rule to make $(PLATFORM_BUILD_ID_FILE), since the build file is no longer our responsibility to maintain.
Attachment #299809 -
Flags: review?(alqahira)
| Assignee | ||
Comment 2•18 years ago
|
||
Comment on attachment 299809 [details] [diff] [review]
Trunk patch
I've got your r=ardissone right here! Cuts 15-30 secs off my "no-op" rebuilds :)
Attachment #299809 -
Flags: review?(alqahira) → review+
| Assignee | ||
Comment 4•18 years ago
|
||
Checked in on the trunk and MOZILLA_1_8_BRANCH before 1.6b3. Think of all of the time we've saved!
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.12
Resolution: --- → FIXED
Target Milestone: --- → Camino1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•