[Mono-list] Patch for "make install" on Windows

Daniel Morgan danmorg@sc.rr.com
Fri, 29 Nov 2002 14:09:04 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_003F_01C297B0.E016BCE0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hey,

Currently, there is no "make install" for Windows.  Here is my
implementation.  Is it okay to commit to cvs?

The actual ChangeLog entry is included in the diff too.

Daniel


------=_NextPart_000_003F_01C297B0.E016BCE0
Content-Type: text/plain;
	name="diff.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="diff.txt"

Index: makefile=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/makefile,v=0A=
retrieving revision 1.20=0A=
diff -u -r1.20 makefile=0A=
--- makefile	9 Nov 2002 14:29:49 -0000	1.20=0A=
+++ makefile	29 Nov 2002 19:07:42 -0000=0A=
@@ -1,12 +1,13 @@=0A=
 VERSION=3D0.13.99=0A=
 =0A=
-DIRS=3Djay nant mcs class nunit tools monoresgen=0A=
+DIRS=3Djay nant mcs class nunit monoresgen ilasm tools=0A=
+INSTALL=3D /usr/bin/install=0A=
 =0A=
 all: =0A=
 	if test x$(OS) =3D xWindows_NT; then make linux; else make -f =
makefile.gnu; fi=0A=
 =0A=
 install:=0A=
-	if test x$(OS) =3D xWindows_NT; then echo Can not install on Windows ; =
else make -f makefile.gnu install; fi=0A=
+	if test x$(OS) =3D xWindows_NT; then make windowsinstall; else make -f =
makefile.gnu install; fi=0A=
 =0A=
 windows:=0A=
 	for i in $(DIRS); do 			\=0A=
@@ -42,3 +43,68 @@=0A=
 	(c=3D`pwd`; d=3D`basename $$c`; cd ..; cp -a $$d mcs-$(VERSION); cd =
mcs-$(VERSION); make clean; cd ..; \=0A=
 	tar czvf $$d/mcs-$(VERSION).tar.gz --exclude=3DCVS --exclude=3D'.#*' =
--exclude=3Dcore --exclude=3D'*~' --exclude=3D'*.exe' mcs-$(VERSION); \=0A=
 	rm -rf mcs-$(VERSION))=0A=
+=0A=
+windowsinstall:=0A=
+	if test x$$prefix =3D x; then		\=0A=
+		echo Usage is: make install =
prefix=3DX:/cygwin/home/MyHome/mono/install;  exit 1;	\=0A=
+	fi=0A=
+	mkdir -p $(prefix)/bin/=0A=
+	for iexe in $(MONO_WIN_INSTALL_BIN) ; do					\=0A=
+		echo Installing exe $$iexe;	\=0A=
+		($(INSTALL) -m 755 $$iexe $(prefix)/bin/) || exit 1;	\=0A=
+		sed -e 's^\@bindir\@^$(prefix)^g' -e "s^\\@thewindowexe\\@^`basename =
\"$$iexe\"`^g" < ./winexe.in > ./winexe.tmp;	\=0A=
+		mv ./winexe.tmp ./$$iexe.sh;	\=0A=
+		($(INSTALL) -m 755 $$iexe.sh $(prefix)/bin/) || exit 1;		\=0A=
+	done=0A=
+	mkdir -p $(prefix)/lib/=0A=
+	for idll in $(MONO_WIN_INSTALL_LIB) ; do				\=0A=
+		echo Installing dll $$idll;	\=0A=
+		($(INSTALL) -m 755 $$idll $(prefix)/lib/) || exit 1;	\=0A=
+	done=0A=
+=0A=
+MONO_WIN_INSTALL_LIB=3D	\=0A=
+	class/lib/I18N.CJK.dll	\=0A=
+	class/lib/I18N.MidEast.dll	\=0A=
+	class/lib/I18N.Other.dll	\=0A=
+	class/lib/I18N.Rare.dll	\=0A=
+	class/lib/I18N.West.dll	\=0A=
+	class/lib/I18N.dll	\=0A=
+	class/lib/Microsoft.VisualBasic.dll	\=0A=
+	class/lib/Mono.Data.MySql.dll	\=0A=
+	class/lib/Mono.Data.PostgreSqlClient.dll	\=0A=
+	class/lib/Mono.Data.SqliteClient.dll	\=0A=
+	class/lib/Mono.Data.SybaseClient.dll	\=0A=
+	class/lib/Mono.Data.Tds.dll	\=0A=
+	class/lib/Mono.Data.TdsClient.dll	\=0A=
+	class/lib/Mono.PEToolkit.dll	\=0A=
+	class/lib/System.Configuration.Install.dll	\=0A=
+	class/lib/System.Data.dll	\=0A=
+	class/lib/System.Drawing.dll	\=0A=
+	class/lib/System.EnterpriseServices.dll	\=0A=
+	class/lib/System.Runtime.Remoting.dll	\=0A=
+	class/lib/System.Runtime.Serialization.Formatters.Soap.dll	\=0A=
+	class/lib/System.Web.Services.dll	\=0A=
+	class/lib/System.Web.dll	\=0A=
+	class/lib/System.Xml.dll	\=0A=
+	class/lib/System.dll	\=0A=
+	class/lib/corlib.dll	\=0A=
+	class/lib/corlib_cmp.dll	\=0A=
+	nunit/NUnitBase.dll	\=0A=
+	nunit/NUnitCore.dll	\=0A=
+	nunit/NUnitCore_mono.dll=0A=
+=0A=
+MONO_WIN_INSTALL_BIN=3D	\=0A=
+	mcs/mcs.exe	\=0A=
+	nant/NAnt.exe	\=0A=
+	nunit/NUnitConsole.exe	\=0A=
+	nunit/NUnitConsole_mono.exe	\=0A=
+	ilasm/ilasm.exe	\=0A=
+	monoresgen/monoresgen.exe	\=0A=
+	tools/EnumCheck.exe	\=0A=
+	tools/IFaceDisco.exe	\=0A=
+	tools/verifier.exe	\=0A=
+	tools/GenerateDelegate.exe	\=0A=
+	tools/monostyle.exe	\=0A=
+	tools/SqlSharp/SqlSharpCli.exe	\=0A=
+	tools/type-reflector/type-reflector.exe	\=0A=
+	tools/corcompare/CorCompare.exe=0A=
Index: ChangeLog=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/ChangeLog,v=0A=
retrieving revision 1.32=0A=
diff -u -r1.32 ChangeLog=0A=
--- ChangeLog	29 Nov 2002 01:23:22 -0000	1.32=0A=
+++ ChangeLog	29 Nov 2002 19:07:42 -0000=0A=
@@ -1,3 +1,24 @@=0A=
+2002-11-29  Daniel Morgan  <danmorg@sc.rr.com>=0A=
+=0A=
+	* INSTALL: renamed to INSTALL.txt because INSTALL =0A=
+	interferred with "make install" on windows=0A=
+	=0A=
+	* makefile: changes to get "make install" work =0A=
+	on windows=0A=
+	=0A=
+	* class/makefile.gnu: flush=0A=
+	=0A=
+	* ilasm/makefile: updated for windows build=0A=
+	=0A=
+	* monoresgen/makefile: updated for windows build=0A=
+	=0A=
+	* tools/SqlSharp/SqlSharpCli.build: flush=0A=
+	=0A=
+	* winexe.in: add file to be template for executable assemblies=0A=
+	to be installed on windows via "make install" by providing=0A=
+	a script that runs mono and the assembly =0A=
+	like mcs runs mono mcs.exe =0A=
+	=0A=
 2002-11-28  Daniel Morgan  <danmorg@sc.rr.com>=0A=
 =0A=
 	* makefile.gnu: added tools directory to linux build=0A=
Index: class/makefile.gnu=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/class/makefile.gnu,v=0A=
retrieving revision 1.30=0A=
diff -u -r1.30 makefile.gnu=0A=
--- class/makefile.gnu	27 Nov 2002 00:59:23 -0000	1.30=0A=
+++ class/makefile.gnu	29 Nov 2002 19:07:42 -0000=0A=
@@ -16,7 +16,7 @@=0A=
 	System.Configuration.Install 	\=0A=
 	Mono.CSharp.Debugger		\=0A=
 	Mono.Data.MySql			\=0A=
-	Mono.Data.PostgreSqlClient \=0A=
+	Mono.Data.PostgreSqlClient		\=0A=
 	Mono.Data.SqliteClient		\=0A=
 	Mono.Data.SybaseClient		\=0A=
 	Mono.Data.TdsClient		\=0A=
Index: ilasm/makefile=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/ilasm/makefile,v=0A=
retrieving revision 1.1=0A=
diff -u -r1.1 makefile=0A=
--- ilasm/makefile	17 Sep 2002 01:44:02 -0000	1.1=0A=
+++ ilasm/makefile	29 Nov 2002 19:07:42 -0000=0A=
@@ -1,5 +1,5 @@=0A=
 RUNTIME =3D mono=0A=
-MCS =3D $(RUNTIME) $(topdir)/mcs/mcs.exe=0A=
+MCS =3D ../mcs/mcs.exe=0A=
 CSFLAGS =3D --target exe=0A=
 INSTALL =3D /usr/bin/install=0A=
 prefix =3D /usr=0A=
@@ -26,9 +26,7 @@=0A=
 	scanner/StringHelperBase.cs	\=0A=
 	scanner/StringHelper.cs=0A=
 =0A=
-all: ilasm.exe=0A=
-=0A=
-ildasm.exe: list=0A=
+ilasm.exe: list=0A=
 	$(MCS) $(CSFLAGS) @list -o ilasm.exe=0A=
 =0A=
 install: all=0A=
@@ -39,4 +37,13 @@=0A=
 	jay -ct < ../jay/skeleton.cs parser/ILParser.jay > parser/ILParser.cs=0A=
 =0A=
 list: $(SOURCES)=0A=
-	echo $(SOURCES) > list=0A=
\ No newline at end of file=0A=
+	echo $(SOURCES) > list=0A=
+=0A=
+all: ilasm.exe=0A=
+=0A=
+linux: ilasm.exe=0A=
+=0A=
+windows: ilasm.exe=0A=
+=0A=
+clean:=0A=
+	rm -f ilasm.exe parser/ILParser.cs list=0A=
Index: monoresgen/makefile=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/monoresgen/makefile,v=0A=
retrieving revision 1.2=0A=
diff -u -r1.2 makefile=0A=
--- monoresgen/makefile	8 Oct 2002 04:32:37 -0000	1.2=0A=
+++ monoresgen/makefile	29 Nov 2002 19:07:42 -0000=0A=
@@ -1,5 +1,24 @@=0A=
-linux:=0A=
+MCS =3D mcs=0A=
+MCS_FLAGS =3D /target:exe $(MCS_DEFINES)=0A=
+INSTALL =3D /usr/bin/install=0A=
+prefix =3D /usr=0A=
 =0A=
-window:=0A=
+SOURCES=3Dmonoresgen.cs=0A=
+=0A=
+all: monoresgen.exe=0A=
+=0A=
+linux: monoresgen.exe=0A=
+=0A=
+windows: monoresgen.exe=0A=
+=0A=
+monoresgen.exe: $(SOURCES)=0A=
+	$(MCS) $(MCS_FLAGS) -o $@ $(SOURCES)=0A=
+=0A=
+install: all=0A=
+	mkdir -p $(prefix)/bin/=0A=
+	$(INSTALL) -m 755 monoresgen.exe $(prefix)/bin/=0A=
+=0A=
+test:=0A=
 =0A=
 clean:=0A=
+	rm -f monoresgen.exe=0A=
Index: tools/SqlSharp/SqlSharpCli.build=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/tools/SqlSharp/SqlSharpCli.build,v=0A=
retrieving revision 1.2=0A=
diff -u -r1.2 SqlSharpCli.build=0A=
--- tools/SqlSharp/SqlSharpCli.build	25 Oct 2002 22:58:25 -0000	1.2=0A=
+++ tools/SqlSharp/SqlSharpCli.build	29 Nov 2002 19:07:42 -0000=0A=
@@ -9,7 +9,7 @@=0A=
 			<arg value=3D"/r:../../class/lib/System.Data.dll"/>
=20
 			<sources>
-				<includes name=3D"*.cs" />
+				<includes name=3D"SqlSharpCli.cs" />
 			</sources>
 		</csc>
 	</target>

------=_NextPart_000_003F_01C297B0.E016BCE0
Content-Type: application/octet-stream;
	name="winexe.in"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="winexe.in"

#!/bin/sh=0A=
@bindir@/bin/mono.exe @bindir@/bin/@thewindowexe@ "$@"=0A=

------=_NextPart_000_003F_01C297B0.E016BCE0--