bug-automake
[Top][All Lists]
Advanced

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

Re: RFE: support per-program noinst_HEADERS


From: Chris Pickett
Subject: Re: RFE: support per-program noinst_HEADERS
Date: Wed, 12 Mar 2008 15:10:41 -0400
User-agent: Thunderbird 1.5.0.14 (Macintosh/20071210)

Hi Ralf,

Ralf Wildenhues wrote:
Hi Chris,

* Chris Pickett wrote on Wed, Mar 12, 2008 at 07:50:46PM CET:
I would like to be able to use noinst_prog_HEADERS, but with 1.10.1 I get a complaint about noinst_progdir not being defined:

You can just put all your not-to-be installed headers into the *_SOURCES
alongside the .c/.cc/... files.  *_HEADERS really is necessary only for
headers that are to be installed.

That doesn't work for me. I am #include'ing .c files, and I do not want objects built for them. This works fine with noinst_HEADERS for a single library or program:

if WPA
  libspmt_la_SOURCES = private.c
  private.c: $(noinst_HEADERS)
  noinst_HEADERS = $(ACTUAL_SOURCES)
else # !WPA


  libspmt_la_SOURCES = $(ACTUAL_SOURCES)
endif # !WPA



where private.c just #include's all of the other .c files in the program.

However, I recently got frustrated trying to run tests against the library. I am creating one binary for each module in the library and running them all with make check. Before, I was including the library with LDADD, and so if a single file in the library changed while trying to make some test pass then all of the tests would get recompiled. So, now I generate a list of src/ .c files that each tests/ .c files needs to include in order to create a proper binary, and #include them all. Disgusting perhaps, but my turnaround time after making a change in the library to try and make a test pass is about 10 seconds now.

I did play with other methods, like adding the objects to prog_LDADD, but I couldn't get them to work. It might be because I'm in tests/ and the objects I want are in src/. Also, I was having problems just listing things in module_SOURCES because the files are identically named: I have src/module.c and tests/module.c

Cheers,
Chris

P.S. I also did get this to work using prog_DEPENDENCIES, but the manual warns that it is not for source code.




reply via email to

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