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