automake
[Top][All Lists]
Advanced

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

Re: [Fwd: Can nobase_pkgdata_DATA take directories? Does not seam so.]


From: Hans Deragon
Subject: Re: [Fwd: Can nobase_pkgdata_DATA take directories? Does not seam so.]
Date: Fri, 05 Mar 2004 13:54:56 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116

Sander Niemeijer wrote:
Hi Hans,

Automake does not support wildcard specification of files (e.g. whole directories). This is to make sure that: - a 'make dist' only includes those files from your subdirectories that really should go in a distribution - a 'make distcheck' is able to check whether any generated files in your subdirectories are properly cleaned by a 'make distclean' - a 'make uninstall' does not remove any files a user may have put in one of your subdirectories

Mmm... the dist target takes directories via EXTRA_DIST, which in a sense is a wildcard. As for the installation, why shouldn't in *_DATA variables allow wildcards? Its up to the author to check if any unwanted files are being installed.

The only place where wildcards should not be allowed is in the uninstall target. If the uninstall target uses *_DATA to determine which file to uninstall, maybe the code should be changed. A dynamically created file should record what specific file has been installed to record what file actually has been installed. The uninstall target would then use the content of this dynamically created file to uninstall only the relevant files and yes, directories. :)

And probably even more reasons...

For a project I am working on we were faced with a similar problem. I ended up writing my own script that creates a 'makefile include' containing rules for all my 'wildcard files' (in our case generated documentation files). If you want to see how we did this, just have a look at our open-source BEAT package (downloadable from http://www.science-and-technology.nl/beat/).

I tried your trick and it works. Thanks, I have two question though. I have the following line:

  include file.lst

Now, if file.lst does not exist, make complains with an error and aborts, even though I created a target to specify how to build it. Do you have a suggestion?

Also, when I call the "all", "install", "dist" targets, I would like to have the file.lst target be called, so its be regenerated automatically. You have any advice?

Obviously, if you and I are building systems to emulate wildcards, its because there is definitively a need for wildcards to be supported. Should we make a feature request?

Regards,
Sander


Thanks, your response is appreciated.
Hans Deragon
--
Consultant en informatique/Software Consultant
Deragon Informatique inc.     Open source:
http://www.deragon.biz        http://autopoweroff.sourceforge.net
mailto://address@hidden     (Automatically poweroff home servers)




reply via email to

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