Closed Bug 775789 Opened 12 years ago Closed 11 years ago

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

Categories

(Firefox Build System :: General, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla20

People

(Reporter: jimb, Assigned: jimb)

References

Details

Attachments

(1 file, 3 obsolete files)

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: nobody → jimb
Status: NEW → ASSIGNED
Attachment #644104 - Flags: review?(ehsan)
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 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-
(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.
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.)
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-
(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.
Revised per glandium's comments.
Attachment #645049 - Attachment is obsolete: true
Attachment #684239 - Flags: review?(mh+mozilla)
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-
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+
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: 11 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?
(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
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.