[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 1.11 doesn't add sources with nonstandard suffixes when making a bin
From: |
Jack Kelly |
Subject: |
Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary |
Date: |
Sat, 28 Nov 2009 00:07:34 +1100 |
2009/11/27 Юрий Пухальский <address@hidden>:
> Automake links binaries through libtool too, at least in my case.
> -----make output-------
> /oracle/10.2.0.4/bin/proc CODE=ANSI_C include=../../include
> include=/oracle/10.2.0.4/lib include=/usr/include ireclen=4800
> oreclen=4800 select_error=no release_cursor=no hold_cursor=yes
> lines=yes ltype=none cpp_suffix=c USERID=xxx/address@hidden
> SQLCHECK=SEMANTICS iname=./blabla.pc oname=./blabla.c
> <ProC blabla skipped>
> cc -DHAVE_CONFIG_H -I. -I../../include -g -DLINUX -Wall -W -MT
> blabla.o -MD -MP -MF .deps/blabla.Tpo -c -o blabla.o blabla.c
> mv -f .deps/blabla.Tpo .deps/blabla.Po
> /bin/sh ../../libtool --tag=CC --mode=link cc -g -DLINUX -Wall -W
> -L/oracle/10.2.0.4/lib -o blabla blabla.o
> ../../lib/common/libcommon.la ../../lib/pro_c/libproc.la -lclntsh
Because here ^ it needed to link against a libtool library. Did you
put ../../lib/common/libcommon.la in blabla_LDADD?
(Also, if these are convenience libraries only, you can use
noinst_ARCHIVES instead and save yourself from compiling everything
twice.)
> -lcurl -lssl -lxml2 -lEx25 -lEec -lpthread -lm
> libtool: link: cc -g -DLINUX -Wall -W -o blabla blabla.o
> -L/oracle/10.2.0.4/lib ../../lib/common/.libs/libcommon.a
> ../../lib/pro_c/.libs/libproc.a -lclntsh -lcurl -lssl -lxml2 -lEx25
> -lEec -lpthread -lm
> -----end of make output-------
>
> And yes, it works when i make a rule from .pc to .c, but:
> How do i clean the intermediate .c file in this case?
> I must add BUILT_SOURCES everywhere, use EXTRA_DIST for distributing
> the original files.
> Generally it's less clear than specifying .pc file directly in _SOURCES.
You still specify the .pc file in _SOURCES, but let make work out how
to make the .c file.
I made a simple test:
--------------------
bin_PROGRAMS = foo
foo_SOURCES = bar.xyz
SUFFIXES = .xyz
.xyz.c:
cp $< $@
--------------------
Here is the make output:
----------------------
$ make
cp bar.xyz bar.c
gcc -DPACKAGE_NAME=\"FULL-PACKAGE-NAME\"
-DPACKAGE_TARNAME=\"full-package-name\" -DPACKAGE_VERSION=\"VERSION\"
-DPACKAGE_STRING=\"FULL-PACKAGE-NAME\ VERSION\"
-DPACKAGE_BUGREPORT=\"BUG-REPORT-ADDRESS\"
-DPACKAGE=\"full-package-name\" -DVERSION=\"VERSION\" -I. -g -O2
-MT bar.o -MD -MP -MF .deps/bar.Tpo -c -o bar.o bar.c
mv -f .deps/bar.Tpo .deps/bar.Po
gcc -g -O2 -o foo bar.o
rm bar.c
---------------------
Behold: Make (GNU Make 3.81 here) is smart enough to see that bar.c is
a temporary file and remove it when finished.
> As for silliness, it's exactly as silly as default .l.o implicit rule
> in standard make:
> .l.o:
> $(LEX) $(LFLAGS) $<
> $(CC) $(CFLAGS) -c lex.yy.c
> rm -f lex.yy.c
> mv lex.yy.o $@
Just because two people do silly things doesn't make it less silly.
-- Jack
- 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/26
- 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/26
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Jack Kelly, 2009/11/26
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary,
Jack Kelly <=
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Jack Kelly, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Jack Kelly, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/30
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Ralf Wildenhues, 2009/11/30
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Юрий Пухальский, 2009/11/30
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Ralf Wildenhues, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Jack Kelly, 2009/11/27
- Re: 1.11 doesn't add sources with nonstandard suffixes when making a binary, Ralf Wildenhues, 2009/11/27