Is there any way around having to specify every sourcefile I create manually in my automake scripts?
I've tried several ways of specifying sourcefiles using find -name *.cc
or the like. I've also tried finding the list in autoconf and substituting it into the Makefile.am, but automake protested that this is not allowed.
If I have to maintain the list by hand, I'm likely to keep forgetting to add newly created files to the list. I'd rather not have to开发者_运维技巧 do that. Is there any way to have new files selected for me automatically?
Any help is appreciated.
Try this:
Makefile.am:
include srcs.am
new-src:
# Some shell command to update srcs.am
Put the definition of foo_SOURCES
in srcs.am
. Then to update the source list, do make new-src; make
.
This seems like a really bad idea, though. Once your project is established, you'll rarely change the file list anyway and you'll still have magic baggage hanging around.
精彩评论