[M3devel] Distinguishing pm3 from cm3 in Quake code

Olaf Wagner wagner at plane.elego.de
Thu Dec 21 08:24:26 CET 2006


On Wed, Dec 20, 2006 at 08:04:14PM -0600, Rodney M. Bates wrote:
> Somewhere, a few months back, I accidentally came across some Quake
> code that tested whether it was being interpreted by the pm3 or cm3
> version of Quake.  I carefully made a note about it, but now that I
> need it, I can't find it.  As I remember, it tested whether a certain
> variable was defined, that is predefined by one of the versions and
> not the other.
> 
> Does anybody happen to remember, without having to do any digging,
> where such Quake code might be or what the mysterious variable is?

You probably think of this code in cvsup/quake/cvsup.quake:

% Determine whether we are using the PM3 release of Modula-3.
if not defined("PM3")
  % The procedure "build_standalone" exists only in SRC Modula-3.
  if not defined("build_standalone")
    PM3 = "T"
  end
end

Since many version, the cm3 builder also defines the following
variables, which may be more appropriate for the purpose:

  EVAL defs.put("CM3_RELEASE", "d5.4.0");      (* readable release
version *)
  EVAL defs.put("CM3_VERSION", "050400");      (* version as number *)
  EVAL defs.put("CM3_CREATED", "2006-08-01");  (* date of last change *)

Olaf
-- 
elego Software Solutions GmbH                           HRB 77719
Olaf Wagner                            E-Mail: wagner(at)elego.de
Ohmstraße 9                               Tel: +49 30 40 04 19 29
10179 Berlin                              Fax: +49 30 23 45 86 95
Cranachstraße 7                           Tel: +49 30 85 58 01 81
12157 Berlin                              Fax: +49 30 85 58 01 88
 ------------------> WWW: http://www.elego-software-solutions.com



More information about the M3devel mailing list