开发者

How to specify multiple sourcefiles in automake at once

开发者 https://www.devze.com 2023-01-21 23:16 出处:网络
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 t

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消