Re: [AD] 'copy' commands in makefile.all?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


In reply to Vincent Penquerc'h <Vincent.Penquerch@xxxxxxxxxx>:
>    Out of curiosity, how do you do it ? 
>    I simply check environment variables (OSTYPE, actually) do detect 
>    Linux against DOS (well, I've not actually tried it on DOS yet :)) 
>    but I don't know if other unix-likes define OSTYPE, and for what 
>    values... 
>

Well, DJGPP is easy:

  ifneq ($(DJGPP),)
  include makefile.dj
  endif

On Unix, the definitive command seems to be uname:

  ifneq ($(findstring Linux,$(shell uname)),)
  include makefile.linux
  endif

  ifneq ($(findstring SunOS,$(shell uname)),)
  include makefile.sunos
  endif

And so on.

Bye for now,
-- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

Attachment: signature.asc
Description: PGP signature



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/