| Age | Commit message (Collapse) | Author | Files | Lines |
|
I don't know when this was exacly broken, since we didn't have such
pages until now.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Scripted change:
$ grep -rl 'The authors of the Linux man-pages' \
| xargs sed -i '/Copyright, The authors of the Linux man-pages project/s/The/the/';
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
- Rename the file CREDITS => AUTHORS
- Say 'authors' in the copyright notice. Scripted change:
$ grep -rn 'The contributors to the Linux man-pages' -l \
| xargs sed -i '/Copyright, The contributors to the Linux man-pages project/s/contributors to/authors of/'
Suggested-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: "G. Branden Robinson" <branden@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Link: <https://lore.kernel.org/linux-man/jpin2dbnp5vpitnh7l4qmvkamzq3h3xljzsznrudgioox3nn72@57uybxbe3h4p/T/#u>
Link: <https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Carlos O'Donell <carlos@redhat.com>
Cc: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Add some spaces for readability and consistency.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Distros expect 'make' to build only what they need. While we want to
build more stuff upstream, for various reasons (mainly, for extra
diagnostics), packagers only want what they'll use, and don't want to
waste CPU time with that.
Also, distros expect 'make install' to only install what they'll use,
which is just the manual pages.
For that, repurpose the build and install targets to do precisely that,
and add build-all and install-all targets that do all that can be done.
Reported-by: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Cherry-picked-from: liba2i.git 791f163b1a72 (2024-07-18, "share/mk/: Reduce the work of 'make && make install'")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
'if' turns off set -e. We want to read files before 'if', so that if
they don't exist, the shell will error out.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
install(1) doesn't work well in Darwin. It seems to be unable to handle
</dev/stdin>. The problem seems to be that Darwin's stdin misbehaves.
I've only workarounded the install target, and not the dist target,
since it's unlikely that one would run it in such a broken system. But
since installing the pages is a common operation that everybody needs,
let's work around it here.
Fixes: 30c38a8bf8ae ("*.mk: Pipe to install(1)")
Link: <https://github.com/NixOS/nixpkgs/pull/300797>
Closes: <https://bugzilla.kernel.org/show_bug.cgi?id=218730>
Reported-by: Sergei Trofimovich <slyich@gmail.com>
Reported-by: Mario Rodas <https://github.com/marsam>
Cc: Eli Schwartz <eschwartz93@gmail.com>
Cc: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
I don't like compressed pages: they make it more difficult/slow to grep
them. This was added to make it easier for users to install compressed
pages even when installing from source, but probably nobody cares at all
these days about a few KiB per page; drive space got cheap. Also, some
of the algorithms were added just for benchmarking (for demonstrating
that they were bad in this case), and not for real use.
This reduces a use of compression tools, which seem to be dangerous
these days.
Link: <https://tukaani.org/xz-backdoor/>
Link: <https://cmpct.info/~sam/blog/posts/automatic-manpage-compression/>
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>
|
|
Each page has its own date.
Add new 'build-man' target, which stamps the date and version in the
pages (in $builddir, not the source ones).
Build-system internal stuff:
$CURDIR will be used for the build system, while $srcdir will be
used for the project root of the repository. This helps use
this build system in other projects.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Use one directory per each (Debian) package, and one file per command.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
man2html(1) crashes on tzfile(5), and the upstream project is defunct.
Link: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067022>
Cc: Paul Eggert <eggert@cs.ucla.edu>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: Robert Luberda <robert@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Piping the output to sed(1) didn't behave well with -Orecurse. Using a
variable behaves well, keeping output synchronized. The length of the
variable name is specific, so that `$(INFO_)` uses exactly 8 characters,
a tab.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Some variables are only part of the implementation of our build system,
and users should not modify them; others are designed to be set by users
when they invoke make(1). Define the latter in share/mk/configure/, so
that they are more visible.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
If any makefile is modified, all files should be remade.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
There were several important bugs regarding these variables that made
them unusable:
- intro(*) pages were completely ignoring them.
- The rules for non-intro pages were also ignoring them.
The variables were only being effectively used for updating the .so
links to other pages, but not the page filenames themselves.
Behavior prior to this patch:
$ rm -rf /tmp/dest;
$ echo '.so man2type/open_how.2type' >man2type/foo.2type;
$ echo '.so man2type/open_how.2type' >man2type/intro.2type;
$ make install-man2type install-manintro \
DESTDIR=/tmp/dest/dir \
man2typedir=/mantoo \
man2typeext=.twotype \
Z=.gz \
LINK_PAGES=symlink;
INSTALL /tmp/dest/dir/mantoo/
INSTALL /tmp/dest/dir/mantoo/foo.2type.gz
INSTALL /tmp/dest/dir/mantoo/open_how.2type.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man1/
INSTALL /tmp/dest/dir/usr/local/share/man/man1/intro.1.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man2type/
INSTALL /tmp/dest/dir/usr/local/share/man/man2type/intro.2type.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man2/
INSTALL /tmp/dest/dir/usr/local/share/man/man2/intro.2.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man3/
[...]
$ readlink /tmp/dest/dir/mantoo/foo.2type.gz;
../mantoo/open_how.twotype.gz
$ readlink /tmp/dest/dir/usr/local/share/man/man2type/intro.2type.gz;
../mantoo/open_how.twotype.gz
Notice the dead symlinks above.
Behavior after this patch:
$ rm -rf /tmp/dest;
$ echo '.so man2type/open_how.2type' >man2type/foo.2type;
$ echo '.so man2type/open_how.2type' >man2type/intro.2type;
$ make install-man2type install-manintro \
DESTDIR=/tmp/dest/dir \
man2typedir=/mantoo \
man2typeext=.twotype \
Z=.gz \
LINK_PAGES=symlink;
INSTALL /tmp/dest/dir/mantoo/
INSTALL /tmp/dest/dir/mantoo/foo.twotype.gz
INSTALL /tmp/dest/dir/mantoo/open_how.twotype.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man1/
INSTALL /tmp/dest/dir/usr/local/share/man/man1/intro.1.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man2/
INSTALL /tmp/dest/dir/usr/local/share/man/man2/intro.2.gz
INSTALL /tmp/dest/dir/mantoo/intro.twotype.gz
INSTALL /tmp/dest/dir/usr/local/share/man/man3/
[...]
$ readlink /tmp/dest/dir/mantoo/foo.twotype.gz;
../mantoo/open_how.twotype.gz
$ readlink /tmp/dest/dir/mantoo/intro.twotype.gz;
../mantoo/open_how.twotype.gz
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Cosmetic changes in preparation for next commit.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
For consistency, let's use $(MAN$(s)DIR).
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Remove the redundant special file name. It would be better to specify
/dev/stdin, if we wanted to specify a file name. But the command just
works as a filter without a filename, so there's no need for that at
all. Remove this redundant code.
The other compressors are compatible with gzip(1) in that regard. Do
the same.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
For consistency with other $(MAN*) variables, remove the underscore.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
|
Debian installs intro(*) pages --including intro(3)-- in the manpages
package, not in manpages-dev, even if they would otherwise belong to the
-dev one due to their section. This is because even if someone may not
be interested in installing development manual pages, an introduction to
the section, explaining what one could find there when installed, is
useful.
Let's make it easy to do that with a specialized target that installs
all intro(*) pages.
This is a breaking change, since from now on, the only way to install
intro(*) pages is through this new target, and the old install-man*
targets won't install their own intro(*) pages. However, of course, the
wrapper targets `install` and `install-man` still install the intro(*)
pages.
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>
|
|
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>
|
|
Specify $DESTDIR, so that it's more clear what this rule is about.
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>
|
|
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>
|