[m-rev.] trivial diff: allow clpr to be compiled with lcc

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 28 00:38:39 AEDT 2002


Estimated hours taken: 0.25
Branches: main

Fix a portability problem that broke the CLP(R) test with lcc.

extras/clpr/clpr/Mmakefile:
	Only enable gcc-specific CFLAGS if we're using gcc.

Workspace: /mnt/ceres/home/ceres/fjh/mercury
Index: extras/clpr/clpr/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/clpr/clpr/Mmakefile,v
retrieving revision 1.13
diff -u -d -r1.13 Mmakefile
--- extras/clpr/clpr/Mmakefile	21 May 2001 06:10:36 -0000	1.13
+++ extras/clpr/clpr/Mmakefile	27 Oct 2002 13:36:39 -0000
@@ -9,9 +9,12 @@
 LIBPATH = \"$(INSTALL_LIBDIR)\"
 
 MGNUCFLAGS = --no-ansi --no-check
-CFLAGS = -g \
--Wall -W -Wno-uninitialized -Wno-unused -Wno-parentheses \
--DLIBPATH=$(LIBPATH)
+ifeq "$(filter gcc,$(shell $(MGNUC) -v 2>&1))" "gcc"
+WARNING_CFLAGS := -Wall -W -Wno-uninitialized -Wno-unused -Wno-parentheses
+else
+WARNING_CFLAGS :=
+endif
+CFLAGS = -g $(WARNING_CFLAGS) -DLIBPATH=$(LIBPATH)
 
 OBJECTS= arithgen.o codegen.o compile.o debug.o dump.o emit.o emul.o index.o \
 	init.o lib.o main.o meta.o parse.o pio.o scan.o solver.btk.o solver.o \

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list