bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

2.54: fail to build with SunOS make


From: Alexandre Duret-Lutz
Subject: 2.54: fail to build with SunOS make
Date: Tue, 24 Sep 2002 11:12:56 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu)

% uname -a
SunOS atlaua 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-250

After fresh untar and configure:

% make
[...]
Making all in m4sugar
../../tests/autom4te                            \
        --language=m4sugar                      \
        --freeze                        \
        --include=./..          \
        --include=..                    \
        --output=m4sugar.m4f
../../tests/autom4te: /tmp/adl/autoconf-2.54/bin/autom4te: not found
*** Error code 1
make: Fatal error: Command failed for target `m4sugar.m4f'
Current working directory /tmp/adl/autoconf-2.54/lib/m4sugar
[...]
% cd bin
% make
% ls
Makefile       autoconf.as    autom4te.in    autoupdate.in
Makefile.am    autoconf.in    autoreconf.in  ifnames.in
Makefile.in    autoheader.in  autoscan.in



Here is a shorter test case.

% cat Makefile 
.SUFFIXES: .in
foo: foo.in
.in:  
        cp $< $@
% touch foo.in
% make
% ls
Makefile  foo.in
% gmake
cp foo.in foo
% ls
Makefile  foo       foo.in


Note it works without the `foo: foo.in' rule.

% cat Makefile 
.SUFFIXES: .in 
.in:  
        cp $< $@
% make foo
cp foo.in foo


One could probably claim it's not a bug in Solaris make by
reading POSIX as follows.

|     Inference rules are formatted as follows:
|
| target:
| <tab>command
| [<tab>command]...
| line that does not begin with <tab> or #
|
|     The application shall ensure that the target portion is a valid target
|     name (see Target Rules ) of the form .s2 or .s1.s2 (where .s1 and .s2
|     are suffixes that have been given as prerequisites of the .SUFFIXES
|     special target and s1 and s2 do not contain any slashes or periods.) If
|     there is only one period in the target, it is a single-suffix inference
|     rule. Targets with two periods are double-suffix inference rules.
|     Inference rules can have only one target before the colon.
[...]
|     If the target to be built does not contain a suffix and there is no rule
|     for the target, the single suffix inference rules shall be checked. The
|     single-suffix inference rules define how to build a target if a file is
|     found with a name that matches the target name with one of the single
|     suffixes appended. A rule with one suffix .s2 is the definition of how
|     to build target from target.s2. The other suffix ( .s1) is treated as
|     null.

The point is "if ... there is no rule for the target". 

`foo: foo.in', even without commands, is defined as 
a "Target Rule" elsewhere in the document.  So it would seem ok
that Solaris make doesn't check the `.in:' rule in our case.


However if this reading is correct, then it shouldn't work with
double-suffix inference rules either.

% cat Makefile
foo.out: foo.in
.SUFFIXES: .in .out
.in.out:  
        cp $< $@
% make
cp foo.in foo.out

-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]