$config .= basename ($one_hdr);
}
}
- my $xform = &transform ('CONFIG' => $config,
- 'DIRS' => join (' ', @tag_deps));
- $xform .= &transform_cond ('SUBDIRS' => &variable_defined ('SUBDIRS'));
-
- $output_rules .= &file_contents ('tags', $xform);
+ $output_rules .=
+ &file_contents ('tags',
+ &transform ('CONFIG' => $config,
+ 'DIRS' => join (' ', @tag_deps)));
$output_rules .= &file_contents ('tags-clean');
&examine_variable ('TAGS_DEPENDENCIES');
}
'TOP_DISTDIR' => $top_distdir)
. &transform_cond ('DIST-TARGETS' =>
scalar @dist_targets,
- 'SUBDIRS' =>
- &variable_defined ('SUBDIRS'),
'DISTDIR' =>
! &variable_defined ('distdir')));
}
# Handle subdirectories.
sub handle_subdirs
{
- return if ! &variable_defined ('SUBDIRS');
+ return
+ unless &variable_defined ('SUBDIRS');
# Make sure each directory mentioned in SUBDIRS actually exists.
foreach my $dir (&variable_value_as_list ('SUBDIRS', 'all'))
('INSTALLINFO' => (defined $options{'no-installinfo'}
? 'install-info-recursive'
: '')));
-
- $recursive_install = 1;
}
# Handle aclocal.m4.
sub handle_installdirs
{
# GNU Makefile standards recommend this.
- if ($recursive_install)
+ if (&variable_defined ('SUBDIRS'))
{
# We create a separate `-am' target so that the -recursive
# rule will work correctly.
$output_rules .= ("all-redirect: ${local_headers}"
. "\n\t"
. '$(MAKE) $(AM_MAKEFLAGS) '
- . ($recursive_install
+ . (&variable_defined ('SUBDIRS')
? 'all-recursive' : 'all-am')
. "\n\n");
$all_target = 'all-redirect';
# appropriate actual redirect.
if ($all_target eq '')
{
- $all_target = $recursive_install ? 'all-recursive' : 'all-am';
+ $all_target = (&variable_defined ('SUBDIRS')
+ ? 'all-recursive' : 'all-am');
}
$output_all = "all: $all_target\n";
}
else
{
- my $lname = $name . ($recursive_install ? '-recursive' : '-am');
+ my $lname = ($name .
+ (&variable_defined ('SUBDIRS') ? '-recursive' : '-am'));
&pretty_print_rule ($name . ":", "\t\t", $lname);
}
&depend ('.PHONY', $name . '-am', $name);
&depend ('.PHONY', 'check', 'check-am');
$output_rules .= ("check: "
- . ($recursive_install ? 'check-recursive' : 'check-am')
+ . (&variable_defined ('SUBDIRS')
+ ? 'check-recursive' : 'check-am')
. "\n");
}
. ',;');
}
- $output_rules .=
- &file_contents ('clean',
- $xform
- . &transform_cond ('SUBDIRS' => $recursive_install));
+ $output_rules .= &file_contents ('clean', $xform);
foreach ('clean', 'distclean', 'mostlyclean', 'maintainer-clean')
{
$included_knr_compile = 0;
$included_libtool_compile = 0;
- # TRUE if install targets should work recursively.
- $recursive_install = 0;
-
# All .P files.
%dep_files = ();
'INSTALL-INFO' => !$options{'no-installinfo'},
'INSTALL-MAN' => !$options{'no-installman'},
- 'CK-NEWS' => $options{'check-news'});
+ 'CK-NEWS' => $options{'check-news'},
+
+ 'SUBDIRS' => &variable_defined ('SUBDIRS'));
# Swallow the file and applied the COMMAND.
my $file = $am_dir . '/' . $basename . '.am';