diff: incorporating lp_solve in the distribution

Fergus Henderson fjh at cs.mu.oz.au
Thu Oct 9 07:25:18 AEST 1997


Tyson, can you tell me whether the COPYING file for lp_solve shown below
meets the Debian distribution requirements?

Chris, can you please have a glance at the rest of the changes
in this diff and see if they look OK?

--------------------------------------------------
COPYING:
--------------------------------------------------
The author of this software, Michel Berkelaar <michel at es.ele.tue.nl>,
has granted permission for anyone to copy lp_solve, or modified version of
lp_solve, for any non-commercial use.  He requests that anyone wishing
to use it for commercial purposes should contact him for a licence.
--------------------------------------------------

Changes needed to include `lp_solve' in the Mercury distribution.

lp_solve/lp_kit.h:
	Delete definition of `NULL' that conflicted with system header files.

lp_solve/COPYING:
	New file, explaining the copying policy.

lp_solve/Mmakefile:
	New file, contains rules for building and installing lp_solve.

Mmakefile:
bindist/Mmakefile:
bindist/bindist.Mmakefile.in:
	Add rules for installing lp_solve and for including it in the
	source and binary distributions.

README:
	Mention lp_solve.

cvs diff -N Mmakefile README bindist/Mmakefile bindist/bindist.Mmakefile.in lp_solve/COPYING lp_solve/Mmakefile lp_solve/lpkit.h
Index: Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/Mmakefile,v
retrieving revision 1.7
diff -u -r1.7 Mmakefile
--- Mmakefile	1997/09/18 06:03:45	1.7
+++ Mmakefile	1997/10/08 18:58:35
@@ -13,7 +13,7 @@
 
 #-----------------------------------------------------------------------------#
 
-SUBDIRS = scripts util boehm_gc runtime library compiler doc profiler
+SUBDIRS = scripts util boehm_gc runtime library compiler doc profiler lp_solve
 
 SUBDIR_MMAKE =	PATH=../scripts:../util:$$PATH \
 		MMAKE_VPATH=. \
@@ -186,7 +186,6 @@
 		mkdir stuff-to-exclude;					\
 		mv mercury-$(VERSION)/trial	stuff-to-exclude;	\
 		mv mercury-$(VERSION)/bytecode	stuff-to-exclude;	\
-		mv mercury-$(VERSION)/lp_solve	stuff-to-exclude;	\
 		mv mercury-$(VERSION)/extras mercury-$(VERSION)-extras; \
 		tar -cf - mercury-$(VERSION) |				\
 			gzip -9 > mercury-$(VERSION).tar.gz;		\
@@ -208,7 +207,7 @@
 .PHONY: install
 install: all install_scripts install_util install_runtime install_boehm_gc \
 		install_library install_compiler install_profiler install_doc \
-		install_grades
+		install_grades install_lp_solve
 
 .PHONY: install_scripts
 install_scripts: scripts
@@ -296,6 +295,10 @@
 	        rm -rf *.dir *.c *.o *.pic_o *.a *.so; \
 	done && \
 	{ mv tmp_dir/* . ; rmdir tmp_dir; true; }
+
+.PHONY: install_lp_solve
+install_lp_solve: lp_solve
+	cd lp_solve && $(SUBDIR_MMAKE) install
 
 #-----------------------------------------------------------------------------#
 
cvs diff: I know nothing about README
Index: bindist/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/bindist/Mmakefile,v
retrieving revision 1.6
diff -u -r1.6 Mmakefile
--- Mmakefile	1997/08/14 13:53:01	1.6
+++ Mmakefile	1997/10/08 18:59:27
@@ -18,7 +18,8 @@
 
 UTILS		= $(INSTALL_PREFIX)/bin/mkinit \
 		  $(INSTALL_PREFIX)/bin/mdemangle \
-		  $(INSTALL_PREFIX)/bin/mtags
+		  $(INSTALL_PREFIX)/bin/mtags \
+		  $(INSTALL_PREFIX)/bin/lp_solve
 
 README_ETC	= ../COPYING ../COPYING.LIB ../HISTORY ../LIMITATIONS \
 		  ../NEWS ../RELEASE_NOTES ../BUGS ../WORK_IN_PROGRESS \
cvs diff: I know nothing about bindist/bindist.Mmakefile.in
Index: lp_solve/COPYING
===================================================================
RCS file: COPYING
diff -N COPYING
--- /dev/null	Thu Oct  9 07:21:06 1997
+++ COPYING	Thu Oct  9 01:48:50 1997
@@ -0,0 +1,4 @@
+The author of this software, Michel Berkelaar <michel at es.ele.tue.nl>,
+has granted permission for anyone to copy lp_solve, or modified version of
+lp_solve, for any non-commercial use.  He requests that anyone wishing
+to use it for commercial purposes should contact him for a licence.
Index: lp_solve/Mmakefile
===================================================================
RCS file: Mmakefile
diff -N Mmakefile
--- /dev/null	Thu Oct  9 07:21:06 1997
+++ Mmakefile	Thu Oct  9 04:55:33 1997
@@ -0,0 +1,55 @@
+#-----------------------------------------------------------------------------#
+# Copyright (C) 1997 University of Melbourne. 
+# This file may only be copied under the terms of the GNU General
+# Public Licence - see the file COPYING in the Mercury distribution.
+#-----------------------------------------------------------------------------#
+
+# Mmakefile - Mmake file for lp_solve.
+
+MAIN_TARGET=lp_solve
+
+MERCURY_DIR=..
+include $(MERCURY_DIR)/Mmake.common
+
+#-----------------------------------------------------------------------------#
+
+.PHONY: lp_solve
+lp_solve: submake
+
+EXTRA_MAKEFLAGS	= CC=gcc CFLAGS="-O3 -Wall -pedantic -ansi" 
+
+#	We need to export MAKEFLAGS="" to avoid passing the `-r' (suppress
+#	builtin rules) supplied by Mmake to the lp_solve Makefile, which
+#	needs the builtin rules. 
+#	We don't use `unset', since the Ultrix /bin/sh doesn't have `unset'.
+submake: force
+	MAKEFLAGS=""; export MAKEFLAGS; \
+	$(MAKE) $(EXTRA_MAKEFLAGS) $(MMAKEFLAGS) lp_solve
+
+.PHONY: force
+force:
+
+#-----------------------------------------------------------------------------#
+
+clean:
+	MAKEFLAGS=""; export MAKEFLAGS; \
+	$(MAKE) $(MMAKEFLAGS) clean
+
+#-----------------------------------------------------------------------------#
+
+# installation rules
+
+.PHONY: install
+install: install_lp_solve install_manpages
+
+.PHONY: install_manpages
+install_manpages:
+	-[ -d $(INSTALL_MAN_DIR)/man1 ] || mkdir -p $(INSTALL_MAN_DIR)/man1
+	cp lp_solve.1 $(INSTALL_MAN_DIR)/man1
+
+.PHONY: install_lp_solve
+install_lp_solve:
+	[ -d $(INSTALL_BINDIR) ] || mkdir -p $(INSTALL_BINDIR)
+	cp `vpath_find lp_solve` $(INSTALL_BINDIR)
+
+#-----------------------------------------------------------------------------#
Index: lp_solve/lpkit.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/lp_solve/lpkit.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 lpkit.h
--- lpkit.h	1997/04/14 03:56:57	1.1.1.1
+++ lpkit.h	1997/10/08 18:07:18
@@ -11,7 +11,6 @@
 #include <math.h>
 #define FAIL -1
 
-#define NULL 	0
 #define FALSE   0
 #define TRUE    1
 
-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list