Response files

Leandro Lucarella llucax at gmail.com
Mon Mar 23 08:24:39 PDT 2009


Walter Bright, el 21 de marzo a las 20:07 me escribiste:
> Andrei Alexandrescu wrote:
> >>.o on Linux, .obj on Windows.
> >OBJSUFFIX_win32 = .obj
> >OBJSUFFIX_linux = .o
> >...
> >OS = linux
> >...
> >... file$(OBJSUFFIX_$(OS)) ...
> 
> I hadn't thought of using macros to generate macros. It's a good idea.

I think it's easier and cleaner to use conditionals:

OS = linux

ifeq ($(OS),linux)
OBJSUFFIX = .o
else ifeq ($(OS),win32)
OBJSUFFIX = .obj
endif

... file$(OBJSUFFIX) ...

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------



More information about the Digitalmars-d mailing list