dist_am_DATA = \
lib/am/am-dir.mk \
- lib/am/texibuild.mk \
lib/am/common-targets.mk \
lib/am/color-tests.mk \
lib/am/serial-tests.mk \
lib/am/distcheck.mk \
lib/am/distdir.mk \
lib/am/subdirs.mk \
+ lib/am/texibuild.mk \
+ lib/am/texinfos.mk \
lib/am/compile.am \
lib/am/configure.am \
lib/am/data.am \
lib/am/scripts.am \
lib/am/texi-vers.am \
lib/am/texi-spec.am \
- lib/am/texinfos.am \
lib/am/vala.am \
lib/am/yacc.am
# FIXME: I think this is an obsolete future feature name.
reject_var 'html_TEXINFOS', "HTML generation not yet supported";
- my $info_texinfos = var ('info_TEXINFOS');
- if ($info_texinfos)
+ if (my $info_texinfos = var ('info_TEXINFOS'))
{
define_verbose_texinfo;
verbatim ('texibuild');
handle_texinfo_helper ($info_texinfos);
}
- $output_rules .= file_contents ('texinfos',
- new Automake::Location,
- 'LOCAL-TEXIS' => !!$info_texinfos);
+ verbatim ('texinfos');
}
# FIXME: this should probably be generalized and moved to header-vars.mk
am.texi.create-installdir = $(if $(and $1,$^),$(MKDIR_P) '$(DESTDIR)$1',@:)
+# Avoid interferences from the environment.
+ifeq ($(call am.vars.is-undef,info_TEXINFOS),yes)
+ info_TEXINFOS :=
+endif
## ---------- ##
## Building. ##
## ---------- ##
.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
-if %?SUBDIRS%
+ifdef SUBDIRS
RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
RECURSIVE_TARGETS += pdf-recursive ps-recursive
dvi: dvi-recursive
info: info-recursive
pdf: pdf-recursive
ps: ps-recursive
-else !%?SUBDIRS%
+else
dvi: dvi-am
html: html-am
info: info-am
pdf: pdf-am
ps: ps-am
-endif !%?SUBDIRS%
+endif
-if %?LOCAL-TEXIS%
+ifdef info_TEXINFOS
dvi-am: $(DVIS)
html-am: $(HTMLS)
info-am: $(INFO_DEPS)
pdf-am: $(PDFS)
ps-am: $(PSS)
-else ! %?LOCAL-TEXIS%
+else
dvi-am:
html-am:
info-am:
pdf-am:
ps-am:
-endif ! %?LOCAL-TEXIS%
+endif
## ------------ ##
##
## TEXINFOS primary are always installed in infodir, hence install-data
## is hard coded.
-if %?INSTALL-INFO%
-if %?LOCAL-TEXIS%
+ifndef am.conf.install-info
+ifdef info_TEXINFOS
am__installdirs += "$(DESTDIR)$(infodir)"
install-data-am: install-info-am
-endif %?LOCAL-TEXIS%
-endif %?INSTALL-INFO%
+endif
+endif
.PHONY: \
install-dvi install-dvi-am \
install-html install-html-am \
install-pdf install-pdf-am \
install-ps install-ps-am
-if %?SUBDIRS%
+ifdef SUBDIRS
RECURSIVE_TARGETS += \
install-dvi-recursive \
install-html-recursive \
install-info: install-info-recursive
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
-else !%?SUBDIRS%
+else
install-dvi: install-dvi-am
install-html: install-html-am
install-info: install-info-am
install-pdf: install-pdf-am
install-ps: install-ps-am
-endif !%?SUBDIRS%
+endif
-if %?LOCAL-TEXIS%
+ifdef info_TEXINFOS
# In GNU make, '$^' used in a recipe contains every dependency for the
# target, even those not declared when the recipe is read; for example,
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; \
done
-else ! %?LOCAL-TEXIS%
+else # !info_TEXINFOS
install-dvi-am:
install-html-am:
install-info-am:
install-pdf-am:
install-ps-am:
-endif ! %?LOCAL-TEXIS%
+endif # !info_TEXINFOS
-## -------------- ##
-## Uninstalling. ##
-## -------------- ##
+## --------------------------- ##
+## Uninstalling and cleaning. ##
+## --------------------------- ##
+
+ifdef info_TEXINFOS
-if %?LOCAL-TEXIS%
.PHONY uninstall-am: \
uninstall-dvi-am \
uninstall-html-am \
$(call am.uninst.cmd,$(infodir),\
$(foreach i,$(notdir $(INFO_DEPS)),$i $i-[0-9] $i-[0-9][0-9]))
-endif %?LOCAL-TEXIS%
-if %?LOCAL-TEXIS%
.PHONY: dist-info
dist-info: $(INFO_DEPS)
@$(foreach f,$(foreach x,$^,$(wildcard $x $x-[0-9] $x-[0-9][0-9])), \
cp -p $f $(distdir)/$(patsubst $(srcdir)/%,%,$f);)
-endif %?LOCAL-TEXIS%
-
-
-## ---------- ##
-## Cleaning. ##
-## ---------- ##
-if %?LOCAL-TEXIS%
am.clean.maint.f += $(foreach f,$(INFO_DEPS),$f $f-[0-9] $f-[0-9][0-9])
-endif %?LOCAL-TEXIS%
+
+endif # !info_TEXINFOS
END
cat > Makefile.am << 'END'
+man1_MANS = foo.1
foobar:
: > $@
if COND
-ps: foobar
+install-man: foobar
:
endif
END
$ACLOCAL
$AUTOMAKE -Wno-override
-# "ps:" should be output in two conditions
-grep 'ps:' Makefile.in # For debugging.
-test $(grep -c '@ps:' Makefile.in) -eq 2
-grep '@COND_TRUE@ps: *foobar' Makefile.in
-grep '@COND_FALSE@ps: *ps-am' Makefile.in
+# "install-man:" should be output in two conditions
+grep 'install-man' Makefile.in # For debugging.
+test $(grep -c '@install-man:' Makefile.in) -eq 2
+grep '@COND_TRUE@install-man: *foobar' Makefile.in
+grep '@COND_FALSE@install-man:' Makefile.in
$AUTOCONF
+: > foo.1
-./configure cond=no
-$MAKE ps
+./configure cond=no --prefix="$(pwd)/inst"
+$MAKE install-man
+test -d inst
test ! -e foobar
-./configure cond=yes
-$MAKE ps
+rm -rf inst
+
+./configure cond=yes --prefix="$(pwd)/inst"
+$MAKE install-man
+test ! -e inst
test -f foobar
:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Make sure dvi target recurses into subdir.
-# Reported by Pavel Roskin.
-
-. ./defs || exit 1
-
-cat > Makefile.am << 'END'
-SUBDIRS = sub
-END
-
-mkdir sub
-cat > sub/Makefile.am << 'END'
-info_TEXINFOS = maude.texi
-END
-
-echo '@setfilename maude.info' > sub/maude.texi
-: > sub/texinfo.tex
-
-$ACLOCAL
-$AUTOMAKE
-
-grep dvi-recursive Makefile.in
-grep '[^-]info-recursive' Makefile.in
-grep '[^n]install-info-recursive' Makefile.in
test ! -e share/$me/html/main2.html
test ! -e share/$me/html/main3.html
+$MAKE dvi
+test -f main.dvi
+test -f sub/main2.dvi
+test -f rec/main3.dvi
+
+$MAKE clean
+test ! -e main.dvi
+test ! -e sub/main2.dvi
+test ! -e rec/main3.dvi
+
$MAKE install-dvi
test -f share/$me/dvi/main.dvi
test -f share/$me/dvi/main2.dvi