Closed Bug 773202 Opened 12 years ago Closed 12 years ago

Generic install/copy rule

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

(Whiteboard: [buildfaster:?])

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch Generic install/copy rule (obsolete) — Splinter Review
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-
Attachment #645211 - Flags: review?(ted.mielczarek)
Attachment #641415 - Attachment is obsolete: true
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+
https://hg.mozilla.org/mozilla-central/rev/8bd1b7ccff26
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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?
Blocks: 784262
Depends on: 790737
Blocks: 881368
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: