Last Comment Bug 742835 - makefiles: autotargets.mk will need a special case rule to handle 'mkdir dot'
: makefiles: autotargets.mk will need a special case rule to handle 'mkdir dot'
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Joey Armstrong [:joey]
:
Mentors:
Depends on:
Blocks: 744835 744750
  Show dependency treegraph
 
Reported: 2012-04-05 11:59 PDT by Joey Armstrong [:joey]
Modified: 2012-04-14 06:45 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
autotargets.mk: handle mkdir 'dot' requests (2.48 KB, patch)
2012-04-05 12:18 PDT, Joey Armstrong [:joey]
ted: review+
Details | Diff | Splinter Review

Description Joey Armstrong [:joey] 2012-04-05 11:59:56 PDT
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) $@
Comment 1 Joey Armstrong [:joey] 2012-04-05 12:18:53 PDT
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.
Comment 2 Ted Mielczarek [:ted.mielczarek] 2012-04-09 10:43:10 PDT
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.
Comment 3 Joey Armstrong [:joey] 2012-04-09 12:40:31 PDT
(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 4 Ted Mielczarek [:ted.mielczarek] 2012-04-12 07:34:33 PDT
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?
Comment 5 Chris Cooper [:coop] [away until Aug 29] 2012-04-13 11:47:07 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/33552f5d803d
Comment 6 :Ms2ger (⌚ UTC+1/+2) 2012-04-14 06:45:54 PDT
https://hg.mozilla.org/mozilla-central/rev/33552f5d803d

Note You need to log in before you can comment on or make changes to this bug.