th...@vmware.com (22 July 2022 15:28) wrote:
> In your example, wouldn't the following accomplish the same thing?
>
> update-mandb:  $(DESTDIR)$(man3dir)/foo.3 $(DESTDIR)$(man3dir)/bar.3

I presume that'd have a rule that runs mandb.  And it works as long as
you're happy to update all man pages whenever you want to update any man
page.

However, if I only want to update perlsyntax.1 and not the rest of the
perl man pages, and I'm doing it this way, I end up with a mess whose
simplified form, for your two pages, looks like:

install: install-other-stuff update-mandb

install-mandb: $(DESTDIR)$(man3dir)/foo.3 $(DESTDIR)$(man3dir)/bar.3
        mandb

install-man-foo: $(DESTDIR)$(man3dir)/foo.3
        mandb

install-man-bar: $(DESTDIR)$(man3dir)/bar.3
        mandb

with rules to build $(DESTDIR) things taking care of actual installing.
and, in the case of a big library of man pages, I'm probably going to
want a separate rule for each of various subsets of the pages, that
installs the subset and runs mandb, because if I try to

$ make install-man-perl-toc install-man-perl-unicode install-man-perlvar

I'm going to run mandb three times, when I'd rather have run it only
once; and my only alternative will be to make install-mandb and install
*all* of my library of man pages, which "may take some time".

So the traditional approach you're proposing does not scale well,

        Eddy.

Reply via email to