man%SECTION%dir and MANS.
* mans.am: Do it.
+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.
# 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;
}
}
# 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'})
{
## 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%
## 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)
$(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)
## 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%
## 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)
$(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)