Note: There are a few cases of duplicates in user autocompletion which are being worked on.

makefiles: autotargets.mk will need a special case rule to handle 'mkdir dot'

RESOLVED FIXED in mozilla14

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: joey, Assigned: joey)

Tracking

(Blocks: 1 bug)

unspecified
mozilla14
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
A handful of makefiles are attempting to 'mkdir dot' while building.
Probably a byproduct of stale code or oversight but autotargets.mk :: mkdir_deps will need a special case rule to handle the pattern of dep w/o a parent directory.

The target should warn when these conditions are found so they can be researched later.

.mkdir.done:
    @echo "WARNING: CURDIR=$(CURDIR) mkdir dot detected"
    @$(TOUCH) $@
(Assignee)

Updated

5 years ago
Assignee: nobody → joey
(Assignee)

Comment 1

5 years ago
Created attachment 612640 [details] [diff] [review]
autotargets.mk: handle mkdir 'dot' requests

Fix for recent ** No rule to make target '.mkdir.done' needed by configure.

Added a stub rule to handle mkdir dot requests.  Warn about the usage and touch the .mkdir.dep dependency so target will be up-to-date.

Comment mkdir -p -p => mkdir -p logic, an earlier request from Kyle.

Wrapper target rules in an ifndef INCLUDED_ conditional so they will only need to be parsed once.
Attachment #612640 - Flags: review?(ted.mielczarek)
Can't we just figure out where this is happening from a try server run, and fix those places? Seems silly to special-case something that doesn't make sense.
(Assignee)

Comment 3

5 years ago
(In reply to Ted Mielczarek [:ted] from comment #2)
> Can't we just figure out where this is happening from a try server run, and
> fix those places? Seems silly to special-case something that doesn't make
> sense.

Well we can either special case it somewhere formal like in autotargets.mk or it will be special cased within individual makefiles -- as happened with that recent "if './' GENERATED_DIRS += $(dir $(PROGRAM))" addition.

If we have a formal target in place, after patch deployment and mkdir dot references are cleaned up, the target can morph into an error documenting the failure mode:

.mkdir.done:
    @echo "ERROR: mkdir dot detected.  $(MAKE) -C $(CURDIR) $(MAKECMDGOALS)"
    @exit 1


.mkdir.done:
    @echo "WARNING: CURDIR=$(CURDIR) mkdir dot detected"
    @$(TOUCH) $@
Comment on attachment 612640 [details] [diff] [review]
autotargets.mk: handle mkdir 'dot' requests

Review of attachment 612640 [details] [diff] [review]:
-----------------------------------------------------------------

Okay. This isn't great, but we can fix the instances where it occurs later. Can you file a followup bug on tracking down and fixing Makefiles that hit this?
Attachment #612640 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Updated

5 years ago
Blocks: 744835
(Assignee)

Updated

5 years ago
Blocks: 744750
(Assignee)

Updated

5 years ago
Keywords: checkin-needed

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/33552f5d803d
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/33552f5d803d
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.