[Top][All Lists]

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

${OBJEXT} in implicit rule

From: Jan Engelhardt
Subject: ${OBJEXT} in implicit rule
Date: Wed, 12 Nov 2014 16:58:35 +0100 (CET)
User-agent: Alpine 2.11 (LSU 23 2013-08-11)

Using automake-1.13.4, when using the following fragment,

bin_PROGRAMS = foo
foo_SOURCES = foo.c bar.k
        gcc -x c -c $< -o $@

I observe that bar.o is not built and not linked into foo.

> make V=0
  CC       foo.o
  CCLD     foo
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../lib64/crt1.o: In function
/undefined reference to `main'
collect2: error: ld returned 1 exit status
Makefile:338: recipe for target 'foo' failed
make: *** [foo] Error 1

Interestingly, using $(OBJEXT) instead of ${OBJEXT} gives a successful
build, so I suspect that automake's parser is lacking in some spot.

reply via email to

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