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

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

Attachment: winexe.in
Description: Binary data

Reply via email to