| Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This happens when the second argument is a subsection, and the warning
is right because the page ends up with no section title, but let's
forget about it for now.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Some projects don't store their source manual pages in a directory
structure resembling $MANPATH. Allow such a directory structure so that
we can for example lint groff's source manual pages:
$ make check lint MANDIR=~/src/gnu/groff;
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There's no need; we can leave empty dirs on 'make uninstall', and it
allows some simplifications. We don't need the FORCE target anymore,
and don't need some directory variables either. While at it, I found
some unused variable that should have been removed a long time ago:
$installdirs_manX
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Those are common in some projects in their source pages; especially
'.in' when it's a template that will be completed by the build system.
This allows linting other projects' pages by running a command like:
$ make lint MANDIR=/home/alx/src/nginx/unit/master/docs/man
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
ISO 8601 is the standard way to express a date. Don't warn about it.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
See commit
4896a4f8c4b8 ("lint-man.mk: lint-man-mandoc: Silence warnings about lowercase in TH")
Cc: Ingo Schwarze <schwarze@openbsd.org>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
See also this commit:
0440d04f8317 ("lint-man.mk: lint-man-groff-eqn: Fix error detection")
Reported-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This avoids breaking some long lines.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Having that in TROFFFLAGS caused repeated warnings for every different
format we produce. Let's have these warnings only in nroff mode.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We redirected them to stdout for some filtering, but forgot to put it
back where it belongs.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Since make(1) uses ':' as a special character in rules, it needs to be
handled carefully. A way to make it work is to escape it with '\:'. We
can use sed(1) to do that right when we get the pathnames. The only
problem with ':' is in rules' targets and prerequisites: everywhere else
it's fine; so let's discuss what needs to be done in those places:
- In the targets, it's as easy as escaping.
- In prerequisites, we can't second-expand variables containing such
pathnames, as the '\' would not be used by make(1) to escape the ':',
but it would be interpreted as part of the pathname. This means we
need to expand rules written using second expansion into several
rules that only expand their variables once.
- $(wildcard ...) also performs the escape, so after using it the
pathnames are not escaped. If we used those variables in targets, we
would need to escape the ':'s again, but since we don't we can skip
that. The trick to make this work is to second-expand these
variables.
Link: <https://stackoverflow.com/a/76096683/6872717>
Cc: GNU Make <bug-make@gnu.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
The @: dummy recipe was there to avoid having rules without recipes.
Rules without recipes can be confusing, as the reader can't know if a
recipe is being defined somewhere else. Also, implicit rules might
apply (in general, but we disable all implicit stuff).
However, @: is also problematic, since make really needs to run that
command, which is unnecessary overhead. But okay, :(1) (really called
true(1), but wouldn't it be a nice man page name?) that's not meaningful
overhead.
And the bigger problem: having a recipe hides the usual:
make: Nothing to be done for 'all'.
We already disable it by using .SILENCE:, but the message can be seen
when using V=1 (after this patch; prior to this patch, it was impossible
to find that message). It is good to be able to know that make(1)
says there's nothing to be done, as a confirmation.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
We used it for transforming groff_man(7)'s CHECKSTYLE into errors, but
we already do that with grep(1). Moreover, the tmac was hiding
troff(1)'s warnings.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
That was probably a typo; it doesn't make sense to ask troff(1) to pass
the tbl(1) preprocessor, since we already did.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add {EXTRA_,}NROFFFLAGS (used exclusively in 'build-catman').
This refactor will allow building other formats.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
To build other output formats from the same sources, let's split the
generic part of the pipelines.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Specify $DESTDIR, so that it's more clear what this rule is about.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Other directories in $builddir are created with $MKDIR, but since these
should be as if installed, it makes sense to use the same command as
when installing.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There are no race conditions, contrary to what some sources say.
Previously, we had each directory depend on its parent directory, so
that only a few parent-most directories would be created with parents,
and all others would be created when their parents exist. That was due
to FUD about TOCTOU race conditions with mkdir -p and parallel make, but
it was just FUD.
This patch makes it so that each directory is directly created with
parents without specifying any dependency. This simplifies the makefile
at some cost: calling mkdir -p so many times is a bit slower. However,
it's only about 5%, so we can live with it, since we're talking about
hundreds of a second for creating all the directories that this build
system knows about.
Reported-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Also, use consistent formatting for the license and copyright.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Support mdoc(7) pages
Split the old build-catman-troff target into two subtargets; the ...-man
one supports man(7) pages, while the ...-mdoc one supports mdoc(7) pages.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Suggested-by: Ralph Corderoy <ralph@inputplus.co.uk>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Calling man(1) is slow. Since we only need to format the page, calling
mandoc(1) is faster and simpler (we could also use groff(1), but
mandoc(1) is probably faster and simpler than groff(1) too). This
brings times down ~3x in my system.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
This pipeline is run for every make(1) invokation, and it was very slow,
due to running a new sed(1) process for every manual page. Remove the
while loop, and rewrite so that all the commands in the pipeline are
only run once. This brings times down ~10x in my system, from 1.5 s, to
just 0.14 s.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
According to the FHS, lib/ is for arch-dependent files, while share/ is
for arch-independent files.
While moving, create a more organized directory structure.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|