might make editing conceptually easier.
* finish up TAGS work
-* `acinstall'
* only remove libtool at top level?
================================================================
-Things to do for autoconf:
-
-* patch autoreconf to run automake and aclocal. I've done this but it is
- not really available. It can't be made available until automake
- is officially released
-
-================================================================
-
Libraries:
* Should support standalone library along with subdir library in same
return 1;
}
- &am_line_error ($var, "\`$var' is target; expected variable")
+ &am_line_error ($var, "\`$var' is a target; expected a variable")
if defined $targets{$var};
return 0;
{
if (defined $targets{$var})
{
- &am_line_error ($var, "\`$var' is target; expected variable");
+ &am_line_error ($var, "\`$var' is a target; expected a variable");
}
else
{
{
# Found a rule.
$was_rule = 1;
- if (defined $contents{$1}
+ if (defined $targets{$1}
&& (@conditional_stack
- ? ! defined $conditional{$1}
- : defined $conditional{$1}))
+ ? ! defined $target_conditional{$1}
+ : defined $target_conditional{$1}))
{
&am_line_error ($1,
"$1 defined both conditionally and unconditionally");
}
# Value here doesn't matter; for targets we only note
# existence.
-# FIXME: I don't understand the next line at all, it seems dead wrong --akim
- $contents{$1} = 1;
$targets{$1} = 1;
my $cond_string = join ('', @conditional_stack);
if (@conditional_stack)
{
- if ($conditional{$1})
+ if ($target_conditional{$1})
{
&check_ambiguous_conditional ($1, $cond_string);
}
- ${$conditional{$1}}{$cond_string} = '1';
+ ${$target_conditional{$1}}{$cond_string} = '1';
}
$content_lines{$1} = $.;
$output_trailer .= $comment . $spacing . $cond_string . $_;
# read_am_file.
%contents = ();
- # This holds the names which are targets. These also appear in
- # %contents.
- %targets = ();
-
# This maps a variable name onto a flag. The flag is true iff the
# variable was first defined with `+='.
%var_was_plus_eq = ();
# This holds a 1 if a particular variable was examined.
%content_seen = ();
+ # This holds the names which are targets. These also appear in
+ # %contents.
+ %targets = ();
+
+ # Same as %CONDITIONAL, but for targets.
+ %target_conditional = ();
+
# This is the conditional stack.
@conditional_stack = ();
{
# Free lance dependency. Output the rule for all the
# targets instead of one by one.
- if (!defined $contents{$targets})
+ if (!defined $targets{$targets})
{
# Some hair to avoid spurious trailing blank
# when there are no dependencies.
--- /dev/null
+#! /bin/sh
+
+# Check basic use of conditionals.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AM_CONDITIONAL(TEST, true)
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+if TEST
+target: true
+ action
+else
+target: false
+endif
+END
+
+set -e
+
+$AUTOMAKE
+grep '^@TEST_TRUE@target: true' Makefile.in
+grep '^@TEST_TRUE@ action' Makefile.in
+grep '^@TEST_FALSE@target: false' Makefile.in
+exit 0
--- /dev/null
+#! /bin/sh
+
+# Targets and macros are two different name spaces.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+INSTALL = INSTALL
+INSTALL:
+ $(INSTALL) INSTALL
+END
+
+$AUTOMAKE || exit 1
+
+grep '^INSTALL = INSTALL$' Makefile.in || exit 1
+
+cat > target.expected <<'EOF'
+INSTALL:
+ $(INSTALL) INSTALL
+EOF
+sed -n '/^INSTALL:/,/^ /p' Makefile.in > target.value
+diff target.expected target.value || exit 1
+
+exit 0