source: libpipi/trunk/pipi-sharp/Makefile.am @ 3035

Last change on this file since 3035 was 3035, checked in by Sam Hocevar, 12 years ago

Improve "make install", especially for .NET assemblies.

File size: 1.2 KB
Line 
1# $Id: $
2
3# We need to install the .config file ourselves because of a gacutil
4# bug (https://bugzilla.novell.com/show_bug.cgi?id=363341)
5monodir = $(libdir)/mono/pipi-sharp-0.0
6if USE_CSHARP
7noinst_DATA = pipi-sharp.dll pipi-sharp.dll.config test.exe
8endif
9
10pipi_sources = \
11        $(srcdir)/AssemblyInfo.cs \
12        $(srcdir)/Pipi.cs \
13        $(srcdir)/Picture.cs
14
15test_sources = \
16        $(srcdir)/test.cs
17
18EXTRA_DIST = $(pipi_sources) $(test_sources) \
19        pipi-sharp.snk pipi-sharp.pc.in pipi-sharp.dll.config.in
20
21pipi-sharp.dll: $(pipi_sources)
22        $(GMCS) -debug -unsafe $(pipi_sources) -out:$@ -target:library
23
24test.exe: $(test_sources) pipi-sharp.dll
25        $(GMCS) -debug $(test_sources) -out:$@ -lib:./ \
26          -r:./pipi-sharp.dll
27
28if USE_CSHARP
29install-data-local:
30        MONO_SHARED_DIR=$$HOME $(GACUTIL) -i pipi-sharp.dll \
31          -package pipi-sharp-0.0 -f -root $(DESTDIR)$(libdir)
32        $(mkinstalldirs) $(DESTDIR)$(monodir)
33        sed -e 's@target="[^"]*/@target="@' < pipi-sharp.dll.config > $(DESTDIR)$(monodir)/pipi-sharp.dll.config
34
35uninstall-local:
36        MONO_SHARED_DIR=$$HOME $(GACUTIL) -u pipi-sharp.dll, Version=0.0 \
37          -package pipi-sharp-0.0 || true
38        rm -f $(DESTDIR)$(monodir)/pipi-sharp.dll.config
39        rmdir $(DESTDIR)$(monodir) 2>/dev/null || true
40endif
41
42clean-local:
43        rm -f *.exe *.dll *.mdb
44
Note: See TracBrowser for help on using the repository browser.