[Gdal-dev] nmake.opt

Simon J Perkins s.perkins at lanl.gov
Fri Jul 18 10:33:50 EDT 2003

Frank Warmerdam wrote:

>> - Avoid committing nmake.opt except when absolutely necessary. Conflicts
>> will still occur now and again though.
> Simon,
> It has been my policy to only commit nmake.opt files when strictly
> necessary, and rather than committing my "working" version, I generally
> get a clean copy from CVS, make my additions, and commit that reducing
> merge/conflict issues.  Problems will sometimes still occur. 

Fair enough. Unfortunately I did just commit some changes to nmake.opt a 
day or two ago. They were in the necessary category I think though since 
I was adding support for an additional format.  But I probably changed 
more than was necessary since the nmake.opt contains my modified install 
and python paths. Sorry about that to all windows users!

>>  Maintain a pristine make-template.opt in CVS, then have people copy
>> that file to nmake.opt (which would be removed from CVS control) as part
>> of the build preparation process (along with inserting the correct
>> config values into the new file).
> My issue with this is aI don't want to add a manual step for users 
> starting
> new with GDAL. I link that the "nmake /f makefile.vc" command will 
> generally
> work out of the box for basic builds of GDAL on windows.   If it were
> possible to have a makefile (for NMAKE) which could copy a template
> nmake.opt.in to nmake.opt if nmake.opt didn't exist, before including 
> it, then
> I would be glad to make the change but I don't know of any way to 
> accomplish
> this. 

This seems like the correct way to do things - analgous to the configure 
"template" that gets shipped with the linux version that is then used to 
generate various user-specific files. On linux, the user has to type 
"configure" before doing a make, and has to specify the configuration 
options they want. What would be wrong with having a .bat file or VB 
script, called, say, win-config, that did a similar thing to generate 
nmake.opt  on windows? win-config by itself would generate a default 
nmake.opt that would work fine for most people. Then various options 
would be specified to change the default install path, include various 
formats, and so forth. win-config itself could be a fairly generic 
program that reads nmake.opt.in (or even win-config.in) to define what 
options it handles and what defaults it writes out and to where. Does 
anything like this exist already? If not I'll look into maybe creating 
one... I don't suppose I can assume that people building GDAL from 
source on windows have python installed, can I? What do people use for 
scripting on windows these days? Surely there's something more advanced 
than .bat files? Otherwise the win-config script might have to be a 
compiled thing that gets shipped with GDAL...



More information about the Gdal-dev mailing list