Age | Commit message (Collapse) | Author | Files | Lines |
|
Make use of silent-rules.mk when building the GDB docs.
During review it was requested that there be more specific rules than
just reusing the general 'GEN' rule everywhere in the doc/ directory,
so I've added:
ECHO_DVIPS = @echo " DVIPS $@";
ECHO_TEX = @echo " TEX $@";
ECHO_PDFTEX = @echo " PDFTEX $@";
ECHO_TEXI2DVI = @echo " TEXI2DVI $@";
ECHO_MAKEHTML = @echo " MAKEHTML $@";
ECHO_TEXI2POD = @echo " TEXI2POD $@";
ECHO_TEXI2MAN = @echo " TEXI2MAN $@";
ECHO_MAKEINFO = @echo " MAKEINFO $@";
Then I've made use of these new silent rules and added lots of uses of
SILENT to reduce additional clutter.
As the man page generation is done in two phases, first the creation
of a .pod file, then the creation of the final man page file, I've
restructured the man page rules. Previously we had one rule for each
of the 5 man pages. I now have one general rule that will generate
all of the 5 .pod files, then I have two rules that convert the .pod
files into the final man pages.
I needed two rules for the man page generation as some man pages match
%.1 and some match %.5. I could combine these by using the GNU Make
.SECONDARYEXPANSION extension, but I think having two rules like this
is probably clearer, and the duplication is minimal.
Cleaning up the temporary .pod files is now moved into the
'mostlyclean' target rather than being done as soon as the man page is
created.
I've added a new SILENT_Q_FLAG to silent-rules.mk, this is like
SILENT_FLAG, but is set to '-q' when in silent mode, this can be used
with the 'dvips' and 'texi2dvi' commands, both of which use '-q' to
mean: only report errors.
As with the rest of the GDB makefiles, I've only converted the
"generation" rules to use silent-rules.mk, the install / uninstall
rules are left unchanged.
When looking at the 'diststuff' target, which generates the info and
man pages, I noticed the recipe for this rule just deleted a temporary
file. As that temporary file is already cleaned up as part of the
'clean' rule I've removed the deletion from the 'diststuff' target.
There are still a few "generation" targets that produce output, there
seems to be no flag to silence the 'tex' and 'pdftex' commands which
some recipes use, I've not worried about these for now, e.g. the
refcard.dvi and refcard.pdf targets still produce some output.
Luckily, when doing a 'make all' in the gdb/ directory, we only build
the info docs by default, and those rules are now nice and silent, so
a complete GDB build is now looking nice and quiet by default.
While working on this patch I noticed that 'make -j all-doc' doesn't
work (reliably), this is a preexisting bug in the way that dvi/pdf
targets are generated. For example gdb.dvi and gdb.pdf both use the
texi2dvi tool, which relies on temporary files to hold state. If both
these rules run in parallel then one (or both) of the recipes will
fail.
Luckily, the default docs target (all), which is what gets run when we
do 'make all' in the gdb/ directory, doesn't build the dvi and pdf
targets, so we're OK in that case.
I've not tried to fix this problem in this commit as it already
existed, and I don't want to do too much in one commit. I mention it
only because I ran into this issue while testing this commit.
|
|
This commit makes use of gdb/silent-rules.mk in the data-directory
Makefile.in. I've only updated the rules that actually generate
things, I've not touched the install or uninstall rules, this matches
gdb/Makefile.in.
I've not managed to completely silence all of the recipe output, the
mkinstalldirs command outputs some diagnostic text which looks like
this:
GEN stamp-python
mkdir -p -- ./python/gdb
mkdir -p -- ./python/gdb/command
mkdir -p -- ./python/gdb/dap
mkdir -p -- ./python/gdb/function
mkdir -p -- ./python/gdb/printer
I have a patch for mkinstalldirs that fixes this (by adding a new
--silent command line flag), but that patch needs to be submitted to
automake, then an updated mkinstalldirs sync'd to the gcc repository,
and then copied into the binutils-gdb repository... so I'm leaving
that for a future project.
Then the guild compiler also emits some diagnostic output, which looks
like this:
GEN stamp-guile
mkdir -p -- ./guile/.
mkdir -p -- ./guile/gdb
wrote `./gdb.go'
wrote `gdb/experimental.go'
wrote `gdb/iterator.go'
wrote `gdb/printing.go'
wrote `gdb/support.go'
wrote `gdb/types.go'
The 'wrote' lines are from the guild compiler. The only way to
silence these would be to redirect stdout to /dev/null I think. I did
prototype this, but wasn't 100% convinced about that part of the
patch, so I've decided to leave that for another day.
I did need to add a new SILENT_ECHO variable to silent-rules.mk, this
is set to a suitable 'echo' command to use within recipes. When we
are in silent mode then I use the 'true' command, while in verbose
mode we actually use 'echo'.
So, other than the issues outlined above, the output when building the
data-directory is now greatly reduced, and more inline with the output
when building in the gdb/ directory.
There should be no change in what is actually built after this commit.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
The switch to linking with libtool now shows a very long link line
even when V=0. This patch arranges to silence libtool in this
situation.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
|
|
Use GDB's silent-rules.mk to make some rules silent by default. These
rules cover most of what is built in sim/.
gdb/ChangeLog:
* silent-rules.mk (ECHO_CCLD, ECHO_AR, ECHO_RANLIB): New.
sim/ChangeLog:
* common/Make-common.in (COMPILE, libsim.a, run$(EXEEXT),
gentmap.o, gentmap): Make rules silent.
Change-Id: Idf9ba5beaee10c7c614859ace5fbdcd1de0287db
|
|
This applies the silent-rules.mk treatment to gdb/testsuite/Makefile.
gdb/ChangeLog
2021-06-01 Tom Tromey <tromey@adacore.com>
* silent-rules.mk (ECHO_CC): New variable.
gdb/testsuite/ChangeLog
2021-06-01 Tom Tromey <tromey@adacore.com>
* Makefile.in (all): Don't print anything.
($(abs_builddir)/site.exp site.exp): Use $(ECHO_GEN).
(expect-read1): Likewise.
(read1.so): Use $(ECHO_CC).
Include silent-rules.mk.
|
|
I would like to modify how the init.c file is generated (its content).
But as it is, a shell script with multiple sed invocations in a Makefile
target, it's not very maintainable. Replace that with a shell script
that does the same, but in a more readable way.
The Makefile rule uses the "-" prefix in front of the for loop, I
presume to ignore any error coming from the fact that xml-builtin.c and
cp-name-parser.c are not found in the srcdir (they are generated source
files). I prefer not to blindly ignore errors, so filter these files
out of INIT_FILES instead (we already filter out other files).
There are no expected meaningful changes to the generated init.c file.
Just the _initialize_all_file declaration that is moved down and "void"
in parenthesis that is removed.
The new regular expression is a bit tighter than the existing one, it
requires the init function to be followed by exactly ` ()`. Update
bpf-tdep.c accordingly.
gdb/ChangeLog:
* Makefile.in (INIT_FILES_FILTER_OUT): New.
(INIT_FILES): Use INIT_FILES_FILTER_OUT.
(stamp-init): Use make-init-c.
* bpf-tdep.c (_initialize_bpf_tdep): Remove "void".
* silent-rules.mk (ECHO_INIT_C): Change.
* make-init-c: New file.
Change-Id: I6d6b12cbccf24ab79d1219bff05df01624c684f9
|
|
This minimizes the "make" output from the yacc and lex rules,
following the same technique as the rest of the Makefile.
The lex rule had a special case to deal with the situation where flex
is not available. I don't think this is needed, so I removed it. If
flex is truly unavailable, the person building gdb can simply "touch"
the output file.
gdb/ChangeLog
2018-07-09 Tom Tromey <tom@tromey.com>
* Makefile.in (%.c: %.y): Use ECHO_YACC.
(%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
* silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
|
|
macOS requires that the gdb executable be signed in order to be able
to successfully use ptrace. This must be done after each link.
This patch adds a new --enable-codesign configure option so that this
step can be automated.
gdb/ChangeLog
2018-06-28 Tom Tromey <tom@tromey.com>
* NEWS: Mention --enable-codesign.
* silent-rules.mk (ECHO_SIGN): New variable.
* configure.ac: Add --enable-codesign.
* configure: Rebuild.
* Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
(gdb$(EXEEXT)): Optionally invoke codesign.
|
|
Many projects (e.g. the Linux kernel) and build systems use "silent"
rules, which means that they'll only print a summary of what's being
done instead of printing all the detailed command lines. While chatting
on the #gdb IRC channel, I realized a few people (including me) thought
it would be nice to have it in GDB too.
The idea is that too much text is not useful, the important information
gets lost. If there's only the essential information, it's more likely
to be useful. Most of the time, when I look at the build output, it's
to see how it's progressing. By just printing a brief summary of each
operation, I can easily spot what's currently being compiled and
therefore how the build progresses (with time you know the order in
which files are compiled almost by heart).
As with other projects (Linux, automake-based things, probably others),
it's possible to print the complete command lines by passing V=1 to make
(or any other non-zero value).
I had one hesitation about this: when people report build failures, we
are more likely to miss the full compile command line. We'll probably
sometimes need to ask people to include the build log with "make V=1".
I don't think it's a big downside, if other projects the size of the
Linux kernel can live with it, I'm sure we can too.
gdb/ChangeLog:
* silent-rules.mk: New.
* Makefile.in: Include silent-rules.mk
(srcdir, VPATH, top_srcdir): Move up.
(COMPILE): Add ECHO_CXX.
(test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
(init.c): Add ECHO_INIT_C.
(gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
(version.c): Add ECHO_GEN.
(printcmd.o): Add ECHO_CXX.
(target-float.o): Add ECHO_CXX.
(ada-exp.o): Add ECHO_CXX.
(stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
(insight$(EXEEXT)): Add ECHO_CXXLD.
* gnulib/configure.ac: Add AM_SILENT_RULES.
* gnulib/aclocal.m4: Re-generate.
* gnulib/configure: Re-generate.
* gnulib/import/Makefile.in: Re-generate.
gdb/gdbserver/ChangeLog:
* Makefile.in: Include silent-rules.mk.
(srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
(COMPILE): Add ECHO_CXX.
(gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
(gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
(version-generated.c): Add ECHO_GEN.
(stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
(IPAGENT_COMPILE): Add ECHO_CXX.
(%-generated.c): Add ECHO_REGDAT.
|