www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - build and minwin

reply "Regan Heath" <regan netwin.co.nz> writes:
The facts:

I'm writing a gui app.
I'm using minwin.
I'm using build.
The version of minwin that I have (downloaded last night) needs deprecated  
features to compile. It uses !==.
I've built minwin into a library minwin.lib.
I have this pragma in my main source file: version(Build)  
pragma(link,"minwin");
I develop in Textpad, I have F7 configured to run build on the current  
file with "-unittest -debug -clean -full"
I have CTRL+F7 configured to run build on the current file with "-release  
-O -clean -full"
My project and others do not need deprecated features to compile, thus no  
"-d" in the above configurations.

The request:

Is there some way to tell build to compile the minwin files with -d and my  
files without?

It would be ideal if this were possible with no, or very little changes to  
the F7 and CTRL+F7 commands I have setup in textpad. I would like them to  
work without too much hassle on any d file I happen to open and want to  
compile.

I'm thining a pragma or a config file. The pragma would effect all files  
in the same package as the file in which it appeared. The config file  
could effect all files in the directory it was found and all subdirectory  
(unless over-ridden by another file). eg.

x\lib.all        <- pragma(cmdline,"-d") in here
x\foo\lib.foo.a; <- effected

x\lib.all
x\lib.brf        <- "-d" in here
x\foo\lib.foo.a; <- uses lib.brf
x\foo\b\b.brf    <- override lib.brf
x\foo\b\abc.d    <- uses b.brf

Of course, Ben will probably update minwin and my problem will vanish..  
however I believe this problem may arise again for other libraries in the  
future.

Regan
Sep 02 2005
parent Derek Parnell <derek psych.ward> writes:
On Sat, 03 Sep 2005 12:29:53 +1200, Regan Heath wrote:

 The facts:
 
 I'm writing a gui app.
 I'm using minwin.
 I'm using build.
 The version of minwin that I have (downloaded last night) needs deprecated  
 features to compile. It uses !==.
 I've built minwin into a library minwin.lib.
 I have this pragma in my main source file: version(Build)  
 pragma(link,"minwin");
 I develop in Textpad, I have F7 configured to run build on the current  
 file with "-unittest -debug -clean -full"
 I have CTRL+F7 configured to run build on the current file with "-release  
 -O -clean -full"
 My project and others do not need deprecated features to compile, thus no  
 "-d" in the above configurations.
 
 The request:
 
 Is there some way to tell build to compile the minwin files with -d and my  
 files without?
 
 It would be ideal if this were possible with no, or very little changes to  
 the F7 and CTRL+F7 commands I have setup in textpad. I would like them to  
 work without too much hassle on any d file I happen to open and want to  
 compile.
 
 I'm thining a pragma or a config file. The pragma would effect all files  
 in the same package as the file in which it appeared. The config file  
 could effect all files in the directory it was found and all subdirectory  
 (unless over-ridden by another file). eg.
 
 x\lib.all        <- pragma(cmdline,"-d") in here
 x\foo\lib.foo.a; <- effected
 
 x\lib.all
 x\lib.brf        <- "-d" in here
 x\foo\lib.foo.a; <- uses lib.brf
 x\foo\b\b.brf    <- override lib.brf
 x\foo\b\abc.d    <- uses b.brf
 
 Of course, Ben will probably update minwin and my problem will vanish..  
 however I believe this problem may arise again for other libraries in the  
 future.
 
 Regan

A good idea Regan. I'll see what I can do. -- Derek Parnell Melbourne, Australia 3/09/2005 11:14:27 AM
Sep 02 2005