.gdbinit fails to get installed in $(DIST)/bin

RESOLVED FIXED in mozilla20

Status

defect
RESOLVED FIXED
7 years ago
Last year

People

(Reporter: jimb, Assigned: jimb)

Tracking

Trunk
mozilla20
All
Linux
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

Assignee

Description

7 years ago
There's a 'libs::' rule in $(topsrcdir)/Makefile.in that attempts to install $(topsrcdir)/.gdbinit in $(DIST)/bin, but it is never run, because $(topsrcdir) is not listed in tier_T_dirs for any tier T.

The libs rule should be moved someplace more appropriate.
Assignee

Comment 1

7 years ago
Assignee: nobody → jimb
Status: NEW → ASSIGNED
Attachment #644104 - Flags: review?(ehsan)

Comment 2

7 years ago
Comment on attachment 644104 [details] [diff] [review]
Properly install .gdbinit file in dist/bin.

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

Looks good to me, but over to khuey too since I already screwed this up once!  :-)
Attachment #644104 - Flags: review?(ehsan) → review?(khuey)

Comment 3

7 years ago
Comment on attachment 644104 [details] [diff] [review]
Properly install .gdbinit file in dist/bin.

1) Plese hg move the file
2) Please use DIST_FILES instead of writing a custom rule
Attachment #644104 - Flags: review?(khuey) → review-
Assignee

Comment 4

7 years ago
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #3)
> Comment on attachment 644104 [details] [diff] [review]
> Properly install .gdbinit file in dist/bin.
> 
> 1) Plese hg move the file
> 2) Please use DIST_FILES instead of writing a custom rule

Perfect, thanks for the advice.
Assignee

Comment 5

7 years ago
One unfortunate bit is that comments in .gdbinit look like directives to 
Preprocessor.py, so they're stripped in the installed file. Is there some way around this? If not, I'd like to use a custom rule.

(I'm actually using git to manage this tree; thus the non-rename-appearing patch. I'll definitely use hg rename when I land the patch.)
Assignee

Comment 6

7 years ago
Add a new rules.mk variable, DIST_FILES_PLAIN, for files that should be
installed in $(DIST)/bin without being preprocessed with Preprocessor.py.
Use that mechanism to install build/.gdbinit.
Attachment #644104 - Attachment is obsolete: true
Attachment #645049 - Flags: review?(benjamin)
Comment on attachment 645049 [details] [diff] [review]
Properly install .gdbinit file in dist/bin.

Might be better to base it on top of bug 773202
Attachment #645049 - Flags: review?(benjamin) → review-

Comment 8

7 years ago
(In reply to comment #5)
> (I'm actually using git to manage this tree; thus the non-rename-appearing
> patch. I'll definitely use hg rename when I land the patch.)

You can use git diff -C, which automatically recognizes copies and renames and outputs the right version of the diff which can be consumed by hg import.
Assignee

Comment 9

7 years ago
Revised per glandium's comments.
Attachment #645049 - Attachment is obsolete: true
Attachment #684239 - Flags: review?(mh+mozilla)
Assignee

Comment 10

7 years ago
Although Splinter doesn't show it, this patch also moves .gdbinit from the top-level directory to the 'build' directory.
Comment on attachment 684239 [details] [diff] [review]
Install .gdbinit correctly in $(DIST)/bin.

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

::: build/Makefile.in
@@ +98,5 @@
>  endif
>  
> +# Put a useful .gdbinit in the bin directory, to be picked up automatically
> +# by GDB when we debug executables there.
> +DIST_FILES_PLAIN += .gdbinit

Something must me missing in the patch because DIST_FILES_PLAIN doesn't exist. That being said, you don't need to add it either. You now can use something like:

GDBINIT_FILES := .gdbinit
GDBINIT_DEST := $(FINAL_TARGET)
INSTALL_TARGETS += GDBINIT

(that needs to come before including rules.mk)
Attachment #684239 - Flags: review?(mh+mozilla) → review-
Assignee

Comment 12

7 years ago
Third try. This is humiliating. (Not your fault, Mike.)
Attachment #684239 - Attachment is obsolete: true
Attachment #687337 - Flags: review?(mh+mozilla)
Attachment #687337 - Flags: review?(mh+mozilla) → review+
Assignee

Comment 13

7 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8868ca286572
Flags: in-testsuite-
Target Milestone: --- → mozilla20
https://hg.mozilla.org/mozilla-central/rev/8868ca286572
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
My setup misses the .gdbinit because I run gdb with the source tree as my PWD. Would we accept a patch to move it from build/.gdbinit to .gdbinit?

Comment 16

7 years ago
(In reply to comment #15)
> My setup misses the .gdbinit because I run gdb with the source tree as my PWD.
> Would we accept a patch to move it from build/.gdbinit to .gdbinit?

Who is that question directed at?  That's fine by me.
What about you jimb? If so I'll write the patch. Once that's done I may be tempted to write some gfx related commands.
Blocks: 820548

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.