Generic install/copy rule

RESOLVED FIXED in mozilla17

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

(Blocks: 1 bug)

unspecified
mozilla17
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [buildfaster:?])

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 641415 [details] [diff] [review]
Generic install/copy rule
Attachment #641415 - Flags: review?(ted.mielczarek)
Comment on attachment 641415 [details] [diff] [review]
Generic install/copy rule

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

::: config/rules.mk
@@ +1688,5 @@
> +# and whether the files are executables or not.
> +#
> +# FOO_FILES := foo bar
> +# FOO_DEST := target_path
> +# FOO_EXECUTABLES := 1

Having to say "FOO_EXECUTABLES := 1" is a bit awkward. I think it'd be nicer if FOO_EXECUTABLES was just the list of executable files themselves.

@@ +1690,5 @@
> +# FOO_FILES := foo bar
> +# FOO_DEST := target_path
> +# FOO_EXECUTABLES := 1
> +# INSTALL_TARGETS += FOO
> +define install_file

I might call this "install_file_rule" or template or something.

@@ +1692,5 @@
> +# FOO_EXECUTABLES := 1
> +# INSTALL_TARGETS += FOO
> +define install_file
> +libs:: $(2)/$(notdir $(1))
> +$(2)/$(notdir $(1)): $(1) | $(call mkdir_deps,$(2))

Pymake doesn't support order-only prerequisites, last I checked.
Attachment #641415 - Flags: review?(ted.mielczarek) → review-
(Assignee)

Comment 3

5 years ago
Created attachment 645211 [details] [diff] [review]
Generic install/copy rule
Attachment #645211 - Flags: review?(ted.mielczarek)
(Assignee)

Updated

5 years ago
Attachment #641415 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Depends on: 770426
Comment on attachment 645211 [details] [diff] [review]
Generic install/copy rule

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

::: config/makefiles/autotargets.mk
@@ +66,5 @@
>  # or stale logic so add a stub target to handle the request and warn for now.
>  .mkdir.done:
>  ifndef NOWARN_AUTOTARGETS # {
>  	@echo "WARNING: $(MKDIR) -dot- requested by $(MAKE) -C $(CURDIR) $(MAKECMDGOALS)"
> +	@$(TOUCH) -t 197001030000 $@

Pymake's touch builtin doesn't support -t, so you should probably just s/$(TOUCH)/touch/ here:
http://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/file/tip/pymake/builtins.py#l85
Attachment #645211 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8bd1b7ccff26
Target Milestone: --- → mozilla17

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/8bd1b7ccff26
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 7

5 years ago
Comment on attachment 645211 [details] [diff] [review]
Generic install/copy rule

>+# Make the timestamp old enough for not being a problem with symbolic links
>+# targets depending on it. Use Jan 3, 1970 to accomodate any timezone where
>+# 197001010000 would translate to something older than epoch.
>+	@$(TOUCH) -t 197001030000 $@
My FAT32 partition doesn't like this. Any chance of using 198001010000 instead?
(Assignee)

Updated

5 years ago
Blocks: 784262

Updated

5 years ago
Depends on: 790737
Blocks: 881368
You need to log in before you can comment on or make changes to this bug.