Skip to content

Commit

Permalink
Fix another goof: consistently use parent directory of target for rule.
Browse files Browse the repository at this point in the history
(I wonder if there's a better way to write this in the rule itself;
i.e. something like `$$(dirname $$@)`.  But for now this will do.)
  • Loading branch information
pnkfelix committed May 4, 2013
1 parent 495bceb commit 175a5ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
21 changes: 12 additions & 9 deletions mk/host.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBRUSTC_$(4)): \
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
$$(HSTDLIB_DEFAULT$(2)_H_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/

@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
Expand All @@ -56,7 +56,7 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(4)): \
$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)) \
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
$$(HSTDLIB_DEFAULT$(2)_H_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_GLOB_$(4)) \
Expand All @@ -65,14 +65,14 @@ $$(HLIB$(2)_H_$(4))/$(CFG_LIBSYNTAX_$(4)): \

$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUNTIME_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@

$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_CORELIB_$(4)) \
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
# Subtle: We do not let the shell expand $(CORELIB_DSYM_GLOB) directly rather
Expand All @@ -90,7 +90,7 @@ $$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
$$(HLIB$(2)_H_$(4))/$(CFG_CORELIB_$(4)) \
$$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB_$(4)) \
Expand All @@ -100,15 +100,15 @@ $$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)): \
$$(HLIB$(2)_H_$(4))/libcore.rlib: \
$$(TLIB$(1)_T_$(4)_H_$(3))/libcore.rlib \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@

$$(HLIB$(2)_H_$(4))/libstd.rlib: \
$$(TLIB$(1)_T_$(4)_H_$(3))/libstd.rlib \
$$(HLIB$(2)_H_$(4))/libcore.rlib \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@

Expand All @@ -117,19 +117,22 @@ $$(HLIB$(2)_H_$(4))/librustc.rlib: \
$$(HLIB$(2)_H_$(4))/libcore.rlib \
$$(HLIB$(2)_H_$(4))/libstd.rlib \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@

$$(HLIB$(2)_H_$(4))/$(CFG_RUSTLLVM_$(4)): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_RUSTLLVM_$(4)) \
| $$(HBIN$(2)_H_$(4))/
| $$(HLIB$(2)_H_$(4))/
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@

$$(HBIN$(2)_H_$(4))/:
mkdir -p $$@

$$(HLIB$(2)_H_$(4))/:
mkdir -p $$@

endef

$(foreach t,$(CFG_HOST_TRIPLES), \
Expand Down
5 changes: 4 additions & 1 deletion mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
$$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X_$(3)): \
$$(DRIVER_CRATE) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)) \
| $$(TLIB$(1)_T_$(2)_H_$(3))/
| $$(TBIN$(1)_T_$(2)_H_$(3))/
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) --cfg rustc -o $$@ $$<
ifdef CFG_ENABLE_PAX_FLAGS
Expand All @@ -83,6 +83,9 @@ endif

endif

$$(TBIN$(1)_T_$(2)_H_$(3))/:
mkdir -p $$@

$$(TLIB$(1)_T_$(2)_H_$(3))/:
mkdir -p $$@

Expand Down

5 comments on commit 175a5ee

@bors
Copy link
Contributor

@bors bors commented on 175a5ee May 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from z0w0
at pnkfelix@175a5ee

@bors
Copy link
Contributor

@bors bors commented on 175a5ee May 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging pnkfelix/rust/issue-3326-play-with-directory-orderonly-prereqs = 175a5ee into auto

@bors
Copy link
Contributor

@bors bors commented on 175a5ee May 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnkfelix/rust/issue-3326-play-with-directory-orderonly-prereqs = 175a5ee merged ok, testing candidate = 063851f

@bors
Copy link
Contributor

@bors bors commented on 175a5ee May 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 175a5ee May 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = 063851f

Please sign in to comment.