help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple way to ascertain whether we're running on Windows?


From: Angus Leeming
Subject: Simple way to ascertain whether we're running on Windows?
Date: Wed, 27 Jul 2005 11:21:45 +0100
User-agent: KNode/0.8.1

The attached Makefile is a slightly modified version of that that comes
with the dtl package http://www.tex.ac.uk/tex-archive/dviware/dtl/

It works on both linux and Windows, but currently appends a ".exe"
extension to the executable names, so:

EXEEXT          = .exe
DT2DV           = dt2dv$(EXEEXT)
DV2DT           = dv2dt$(EXEEXT)

Is there a simple way to do so on Windows only? In pseudo code:

if Windows
  EXEEXT = .exe
else
  EXEEXT =
endif

I'm not worried about cross compilation; they'll have to change the name of
the compiler anyway:

   $ make EXEEXT='.angus' CC='i386-mingw32-gcc'

Ideally, "simple" means "without using a gnu make extension".

Angus

Attachment: Makefile
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]