Author: miguel
Date: 2007-03-22 15:42:48 -0500 (Thu, 22 Mar 2007)
New Revision: 74841

Added:
   trunk/bitsharp/src/script.in
Modified:
   trunk/bitsharp/src/Makefile
   trunk/bitsharp/src/MonoTorrent/Makefile
   trunk/bitsharp/src/rules.make
Log:
Add support for make install

Modified: trunk/bitsharp/src/Makefile
===================================================================
--- trunk/bitsharp/src/Makefile 2007-03-22 20:34:13 UTC (rev 74840)
+++ trunk/bitsharp/src/Makefile 2007-03-22 20:42:48 UTC (rev 74841)
@@ -13,3 +13,18 @@
 config.make:
        echo You must run configure first
        exit 1
+
+install: install-setup 
+       for dir in $(SUBDIRS); do \
+               (cd $$dir && make install) \
+       done
+
+include config.make
+
+install-setup: 
+       -mkdir $(prefix)/lib/bitsharp
+       -mkdir $(prefix)/bin
+       sed -e "s,@prefix@,$(prefix)," -e 's/@cmd@/MonoTorrent.exe/' < 
script.in > monotorrent
+       sed -e "s,@prefix@,$(prefix)," -e 's/@cmd@/MonoTorrent.Interface.exe/' 
< script.in > monotorrent-gtk
+       chmod +x monotorrent-gtk monotorrent
+       cp monotorrent monotorrent-gtk $(prefix)/bin
\ No newline at end of file

Modified: trunk/bitsharp/src/MonoTorrent/Makefile
===================================================================
--- trunk/bitsharp/src/MonoTorrent/Makefile     2007-03-22 20:34:13 UTC (rev 
74840)
+++ trunk/bitsharp/src/MonoTorrent/Makefile     2007-03-22 20:42:48 UTC (rev 
74841)
@@ -1,12 +1,13 @@
-CSC=gmcs 
 OUT=../bin/MonoTorrent.exe
-REFERENCES=../bin/MonoTorrent.Common.dll,../bin/MonoTorrent.Client.dll,../bin/MonoTorrent.BEncoding.dll,../Libs/Upnp.dll
+REFERENCES=\
+       -r:../bin/MonoTorrent.Common.dll        \
+       -r:../bin/MonoTorrent.Client.dll        \
+       -r:../bin/MonoTorrent.BEncoding.dll     \
+       -r:../Libs/Upnp.dll
+
 SOURCES=main.cs \
        Top10Listener.cs
 
-all: testclient
+all: $(OUT)
 
-testclient: $(SOURCES)
-       mkdir -p ../bin
-       $(CSC) $(SOURCES) -target:exe -d:DEBUG -out:$(OUT) -r:$(REFERENCES)
-       cp ../Libs/Upnp.dll ../bin/Upnp.dll
\ No newline at end of file
+include ../rules.make
\ No newline at end of file

Modified: trunk/bitsharp/src/rules.make
===================================================================
--- trunk/bitsharp/src/rules.make       2007-03-22 20:34:13 UTC (rev 74840)
+++ trunk/bitsharp/src/rules.make       2007-03-22 20:42:48 UTC (rev 74841)
@@ -14,7 +14,5 @@
        -rm $(OUT)
 
 install: 
-       mkdir $(prefix)/lib/bitsharp
-       mkdir $(prefix)/bin
        cp $(OUT) $(prefix)/lib/bitsharp
        
\ No newline at end of file

Added: trunk/bitsharp/src/script.in
===================================================================
--- trunk/bitsharp/src/script.in        2007-03-22 20:34:13 UTC (rev 74840)
+++ trunk/bitsharp/src/script.in        2007-03-22 20:42:48 UTC (rev 74841)
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec mono @prefix@/lib/bitsharp/@cmd@ $@
\ No newline at end of file

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to