`make install-man` does nothing
alejandro-colomar opened this issue · 5 comments
alx@debian:~/src/shadow/shadow/master$ ./autogen.sh >/dev/null 2>&1
alx@debian:~/src/shadow/shadow/master$ make install-man
make: Nothing to be done for 'install-man'.
alx@debian:~/src/shadow/shadow/master$ grepc -x mk -t r install-man <Makefile
(standard input):install-man:
alx@debian:~/src/shadow/shadow/master$ grep -C1 install-man <Makefile
install-man:
--
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
Huh?
Cc: @thesamesam
It seems using autotools doesn't necessarily result in a robust build system? =)
Jokes apart, could you have a look at this?
Thanks!
@alejandro-colomar bad jokes aside, automake doesn't necessarily promise what internal subdivisions you can use for slicing up the installation set into sections and installing them individually using install-*
targets under recursive situations.
make -C man install-man
should work fine at the individual subdir level.
(And so would meson install --tags=man
as it doesn't do recursive make.)
Thanks. (Although make -C man install-man
seems more like a workaround, rather than the intended way to do this.)
autotools allows you to install individual subdirs, which is an often-used feature for example for cases such as "I would like to install gcc in groups so that individual subsystems end up in different split .deb / .rpm / .pkg.tar.zst packages".
I'm less familiar with people wanting to install "just the manual pages". Usually if someone wants to install only certain types of files, it tends to be "I want to do a minimal install of just the shared libraries and headers".
Anyway, automake does generate per-type install targets in each subdir. It also generates an install target that installs all types, and some targets (in particular, "install") are recursive and will not just install the blank nothingness in the root directory, but also run make install
in each of the SUBDIRS
.
I suppose there's no explicit reason install-man couldn't do the same, if someone wanted it to. Perhaps no one ever craved it before.
Defining it yourself is simple:
From ff385bdeea6eefa8d5798b5127d40b19c0869801 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Sun, 17 Mar 2024 16:58:05 -0400
Subject: [PATCH] add a top-level install-man target that runs install-man
inside SUBDIRS
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
---
Makefile.am | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index ed110f7a..5826184c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,4 +12,7 @@ SUBDIRS += src po contrib doc etc tests/unit
if ENABLE_REGENERATE_MAN
SUBDIRS += man
+
+install-man:
+ $(MAKE) -C man install-man
endif
--
2.43.2
Thanks! I'll open a PR with this patch.