Patching configure - Or Not

Ryan Schmidt ryandesign at macports.org
Fri Feb 8 10:50:09 PST 2008


On Feb 8, 2008, at 05:13, Anders F Björklund wrote:

> Michael Franz wrote:
>
>> I need to change the way configure works for a port.  Is it better  
>> to patch configure or change the underlying files and regenerate  
>> configure?  In this case I have a change to acinclude.m4.  To get  
>> everything updated I need to run aclocal, automake and autoconf.
>>
>> Since I cannot figure out how to get aclocal, automake and  
>> autoconf to run in the pre-configure step I have to patch  
>> configure.  Is this a good idea?
>
> If you want to patch something simple, then the quick-and-dirty  
> approach is to patch *both*.
> This makes it easy to use, but also easier to separate when sending  
> the patch upstream...
>
> There's plenty of examples of ports doing it this way in the  
> current tree, for instance ?
>
> Just make sure that the "configure" has a later timestamp than the  
> "configure.ac" etc does.
> Otherwise configure will notice, and try to regenerate itself when  
> invoked (and might fail)
>
> i.e. patch "configure.ac" (or configure.in or .m4) first in the  
> file, and "configure" after


Is it sufficient if they have the same exact timestamp? Remember that  
a Subversion repository does not store file modification times. It  
only stores revision times. All files modified in the same revision  
will have the same modification time when checked out. The  
modification time will either be the time when the revision was  
committed if the client configuration says "use-commit-times=yes",  
otherwise (and by default) the modification time will be whenever you  
ran "svn update".



More information about the macports-users mailing list