[Top][All Lists]

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

Re: How does one compile in a "make check" test?

From: Bruce Korb
Subject: Re: How does one compile in a "make check" test?
Date: Fri, 16 Dec 2005 11:18:08 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

I like replying to my own messages :)

How's this for an ugly hack?

Add the following to a project build directory:

   test/cc.defs :
       (echo COMPILE="'$(COMPILE)'" ; \
       echo LINK="'$(LINK)'" | sed 's/ -o.*//') > $@

and in the test directory:

   $(TESTS) : cc.defs
        cd .. ; $(MAKE) test/cc.defs

and then use ${COMPILE} and ${LINK} in my test scripts?  :)
I don't like it, but I think it ought to work....
How reasonable is that?  Thanks - Bruce

Bruce Korb wrote:


I need to be able to create a source file and compile the thing
in my "make check" testing.  Unfortunately, I have no need for
compiling anything in the "test" directory via "make", so the has no:  mumble_PROGRAMS stuff in it.  Consequently,
there are no compile rules in the Makefile, either.  What is the
recommended way of convincing libtool that it should compile a
program linking against libraries that can be in any of various
places?  What I have been trying does not work on some platforms,
though it seems to work on most:

+ gcc -DHAVE_CONFIG_H -g -O2 -DTEST_TEST_NESTED_OPTS -I/local/build/autogen-5.8 -I/local/build/autogen-5.8/agen5 -I/local/build/autogen-5.8/autoopts -I/usr/local/include -o nested nested.c /local/build/autogen-5.8/autoopts/.libs/libopts.a /local/build/autogen-5.8/autoopts/.libs/libguileopts.a -Wl,-R -Wl,-rpath,/usr/local/lib -Wl,-L/usr/local/lib -lguile -lguile-ltdl -Wl,-rpath,/usr/local/lib -lcrypt -lm
/usr/local/lib: file not recognized: File format not recognized
collect2: ld returned 1 exit status
+ failure cannot compile nested.c

Thanks! Regards, - Bruce

reply via email to

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