diff options
author | Akim Demaille <akim@epita.fr> | 2001-04-09 14:38:35 +0000 |
---|---|---|
committer | Akim Demaille <akim@epita.fr> | 2001-04-09 14:38:35 +0000 |
commit | 7400c62b93c87ba3d4c712767db8d903fa7503ee (patch) | |
tree | 5758597d9fd89f0058db45fde9d6b11236ae95bf | |
parent | 24ebdf39aa1eb1b2d9cdfea2da06b07012315d58 (diff) | |
download | automake-7400c62b93c87ba3d4c712767db8d903fa7503ee.tar.gz |
* automake.in (&handle_man_pages): Rely on mans.am to define
man%SECTION%dir and MANS.
* mans.am: Do it.
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | automake.in | 21 | ||||
-rw-r--r-- | lib/am/mans-vars.am | 11 | ||||
-rw-r--r-- | lib/am/mans.am | 16 | ||||
-rw-r--r-- | mans-vars.am | 11 | ||||
-rw-r--r-- | mans.am | 16 |
6 files changed, 52 insertions, 29 deletions
@@ -1,5 +1,11 @@ 2001-04-09 Akim Demaille <akim@epita.fr> + * automake.in (&handle_man_pages): Rely on mans.am to define + man%SECTION%dir and MANS. + * mans.am: Do it. + +2001-04-09 Akim Demaille <akim@epita.fr> + * automake.in (&variable_dump): Use %var_type properly. (¯o_define): Enforce better overriding rules. Handle the special case that used to handle... diff --git a/automake.in b/automake.in index 1d2752faa..5cbfc37b4 100755 --- a/automake.in +++ b/automake.in @@ -2741,12 +2741,12 @@ sub handle_man_pages # sections used in man_MANS. my (%sections, %vlist); # Add more sections as needed. - foreach my $sect ('0'..'9', 'n', 'l') + foreach my $section ('0'..'9', 'n', 'l') { - if (&variable_defined ('man' . $sect . '_MANS')) + if (&variable_defined ('man' . $section . '_MANS')) { - $sections{$sect} = 1; - $vlist{'$(man' . $sect . '_MANS)'} = 1; + $sections{$section} = 1; + $vlist{'$(man' . $section . '_MANS)'} = 1; } } @@ -2767,18 +2767,13 @@ sub handle_man_pages # Now for each section, generate an install and unintall rule. # Sort sections so output is deterministic. - foreach my $sect (sort keys %sections) + foreach my $section (sort keys %sections) { - &define_variable ('man' . $sect . 'dir', '$(mandir)/man' . $sect); - $output_rules .= &file_contents ('mans', - ('SECTION', $sect)); + $output_rules .= &file_contents ('mans', ('SECTION', $section)); } - # We don't really need this, but we use it in case we ever want to - # support noinst_MANS. - &define_variable ("MANS", join (' ', sort keys %vlist)); - - $output_vars .= &file_contents ('mans-vars'); + $output_vars .= &file_contents ('mans-vars', + ('MANS' => join (' ', sort keys %vlist))); if (! defined $options{'no-installman'}) { diff --git a/lib/am/mans-vars.am b/lib/am/mans-vars.am index 490e663b5..cbffd2a5f 100644 --- a/lib/am/mans-vars.am +++ b/lib/am/mans-vars.am @@ -17,11 +17,6 @@ ## 02111-1307, USA. NROFF = nroff - -## FIXME: This is not elegant: there is more than simply variables, -## but we take advantage of the facts that these are factored dependencies, -## and therefore will be output here, in the variable section. - -.PHONY: install-man uninstall-man -?INSTALL-MAN?install-data-am: install-man -?INSTALL-MAN?uninstall-am: uninstall-man +## We don't really need this, but we use it in case we ever want to +## support noinst_MANS. +MANS = %MANS% diff --git a/lib/am/mans.am b/lib/am/mans.am index 970ee09ac..2566953e9 100644 --- a/lib/am/mans.am +++ b/lib/am/mans.am @@ -16,8 +16,17 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +man%SECTION%dir = $(mandir)/man%SECTION% + +## ------------ ## +## Installing. ## +## ------------ ## + ## MANS primary are always installed in mandir, hence install-data ## is hard coded. + +.PHONY: install-man +?INSTALL-MAN?install-data-am: install-man ?INSTALL-MAN?_am_installdirs += $(DESTDIR)$(man%SECTION%dir) .PHONY install-man: install-man%SECTION% install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS) @@ -46,7 +55,14 @@ install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS) $(INSTALL_DATA) $$file $(DESTDIR)$(man%SECTION%dir)/$$inst; \ done + +## -------------- ## +## Uninstalling. ## +## -------------- ## + ## This is just completely gross. +.PHONY: uninstall-man +?INSTALL-MAN?uninstall-am: uninstall-man .PHONY uninstall-man: uninstall-man%SECTION% uninstall-man%SECTION%: @$(NORMAL_UNINSTALL) diff --git a/mans-vars.am b/mans-vars.am index 490e663b5..cbffd2a5f 100644 --- a/mans-vars.am +++ b/mans-vars.am @@ -17,11 +17,6 @@ ## 02111-1307, USA. NROFF = nroff - -## FIXME: This is not elegant: there is more than simply variables, -## but we take advantage of the facts that these are factored dependencies, -## and therefore will be output here, in the variable section. - -.PHONY: install-man uninstall-man -?INSTALL-MAN?install-data-am: install-man -?INSTALL-MAN?uninstall-am: uninstall-man +## We don't really need this, but we use it in case we ever want to +## support noinst_MANS. +MANS = %MANS% @@ -16,8 +16,17 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. +man%SECTION%dir = $(mandir)/man%SECTION% + +## ------------ ## +## Installing. ## +## ------------ ## + ## MANS primary are always installed in mandir, hence install-data ## is hard coded. + +.PHONY: install-man +?INSTALL-MAN?install-data-am: install-man ?INSTALL-MAN?_am_installdirs += $(DESTDIR)$(man%SECTION%dir) .PHONY install-man: install-man%SECTION% install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS) @@ -46,7 +55,14 @@ install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS) $(INSTALL_DATA) $$file $(DESTDIR)$(man%SECTION%dir)/$$inst; \ done + +## -------------- ## +## Uninstalling. ## +## -------------- ## + ## This is just completely gross. +.PHONY: uninstall-man +?INSTALL-MAN?uninstall-am: uninstall-man .PHONY uninstall-man: uninstall-man%SECTION% uninstall-man%SECTION%: @$(NORMAL_UNINSTALL) |