summaryrefslogtreecommitdiff
path: root/devel/gps/patches/patch-ae
blob: 14ded1e7d3e00b6729ff17f61b3701116d3f0c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
$NetBSD: patch-ae,v 1.2 2011/10/14 17:22:06 marino Exp $

--- Makefile.in.orig	2010-09-24 10:51:03.000000000 +0200
+++ Makefile.in	2011-10-11 17:59:53.000000000 +0200
@@ -11,10 +11,12 @@
 prefix          = @prefix@
 bindir          = $(prefix)/bin
 sharedir        = $(prefix)/share
+docdir          = $(prefix)/share/doc/gps
 examplesdir     = $(prefix)/share/examples/gps
 
 default:
 	$(MAKE) -C gps $@
+	$(AWK) -f distrib/gnat_switches.awk < gnat/gnat_ugn.texi > share/plug-ins/gnat_switches.py
 
 clean:
 	$(MAKE) -C gps $@
@@ -24,12 +26,13 @@
 	(cd scripts; ./testsuites clean)
 
 install-common:
-	$(MKDIR) $(bindir)
-	$(MKDIR) $(sharedir)
-	$(MKDIR) $(examplesdir)
-	$(MKDIR) $(sharedir)/gps
-	$(MKDIR) $(sharedir)/gps/docgen2
-	$(MKDIR) $(sharedir)/gps/aunit
+	$(MKDIR) $(DESTDIR)$(bindir)
+	$(MKDIR) $(DESTDIR)$(sharedir)
+	$(MKDIR) $(DESTDIR)$(docdir)
+	$(MKDIR) $(DESTDIR)$(examplesdir)
+	$(MKDIR) $(DESTDIR)$(sharedir)/gps
+	$(MKDIR) $(DESTDIR)$(sharedir)/gps/docgen2
+	$(MKDIR) $(DESTDIR)$(sharedir)/gps/aunit
 ifeq ($(OS),Windows_NT)
 # On Windows we distribute two versions of subversion.xml, one that
 # supports Cygwin/Subversion and one for native Subversion.
@@ -42,45 +45,40 @@
 		share/plug-ins/_subversion_ \
 		> share/plug-ins/subversion_native_windows.xml
 endif
-	$(RM) $(sharedir)/gps/library/*.py
-	$(RM) $(sharedir)/gps/library/*.xml
-	$(RM) $(sharedir)/gps/plug-ins/*.py
-	$(RM) $(sharedir)/gps/plug-ins/*.xml
-	$(RMDIR) $(sharedir)/gps/templates
 # update runtime.xml before copying the plug-ins files.
 	(cd distrib; $(PERL) from_impunit.pl)
-	(cd share; tar cf - plug-ins/*.xml) | (cd $(sharedir)/gps; tar xf -)
+	(cd share; tar cf - plug-ins/*.xml) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
 ifeq ($(OS),Windows_NT)
 # Clean-up changes made above for Windows.
 	$(MV) share/plug-ins/_subversion_ share/plug-ins/subversion.xml
 	$(RM) share/plug-ins/subversion_native_windows.xml
 endif
-	$(AWK) -f distrib/gnat_switches.awk < gnat/gnat_ugn.texi > $(sharedir)/gps/plug-ins/gnat_switches.py
-	(cd share; tar cf - plug-ins/*.py) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - plug-ins/gps_utils/*.py) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - plug-ins/spark/*.py) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - plug-ins/*.png) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - plug-ins/images/*.png) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - library/*.xml) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - library/*.py) | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - library/pygps/*.py) | (cd $(sharedir)/gps; tar xf -)
-	$(RM) $(sharedir)/gps/plug-ins/emacs.xml
-	(cd share; tar cf - icons/)  | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - templates/)  | (cd $(sharedir)/gps; tar xf -)
-	(cd share; tar cf - *.*)  | (cd $(sharedir)/gps; tar xf -)
+	(cd share; tar cf - plug-ins/*.py*) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - plug-ins/gps_utils/*.py*) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - plug-ins/spark/*.py*) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - plug-ins/*.png) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - plug-ins/images/*.png) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - library/*.xml) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - library/*.py*) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - library/pygps/*.py*) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	$(RM) $(DESTDIR)$(sharedir)/gps/plug-ins/emacs.xml
+	(cd share; tar cf - icons/) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - templates/) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
+	(cd share; tar cf - *.*) | (cd $(DESTDIR)$(sharedir)/gps; tar xf -)
 	(cd docgen2/resources; tar cf - *.tmpl custom/*.css support/*.css support/*.js support/images/*.png) \
-		| (cd $(sharedir)/gps/docgen2; tar xf -)
+		| (cd $(DESTDIR)$(sharedir)/gps/docgen2; tar xf -)
 	(cd aunit/templates; tar cf - *.tmpl) \
-		| (cd $(sharedir)/gps/aunit; tar xf -)
-	$(MAKE) -C docs install
-	(cd examples; tar cf - --exclude .svn . ) | (cd $(examplesdir); tar xf -)
+		| (cd $(DESTDIR)$(sharedir)/gps/aunit; tar xf -)
+	${INSTALL} docs/gps-splash.png $(DESTDIR)$(sharedir)/gps
+	(cd docs; tar -cf - html/) | (cd $(DESTDIR)$(docdir); tar xf -)  
+	(cd examples; tar cf - --exclude .svn . ) | (cd $(DESTDIR)$(examplesdir); tar xf -)
 
 install: install-common
 ifeq ($(OS),Windows_NT)
 	$(INSTALL_PROGRAM) gps/obj/gps.exe $(bindir)
 	$(MAKE) -C common/expect install
 else
-	$(INSTALL_PROGRAM) gps/obj/gps $(bindir)
+	$(INSTALL_PROGRAM) gps/obj/gps $(DESTDIR)$(bindir)
 endif
 
 install-strip: install-common
@@ -89,8 +87,8 @@
 	$(INSTALL_PROGRAM) distrib/gps_run.cmd $(bindir)
 	$(MAKE) -C common/expect install-strip
 else
-	$(INSTALL_PROGRAM) -s gps/obj/gps $(bindir)/gps_exe
-	$(INSTALL_PROGRAM) distrib/.gps_wrapper $(bindir)/gps
+	$(INSTALL_PROGRAM) -s gps/obj/gps $(DESTDIR)$(bindir)/gps_exe
+	$(INSTALL_PROGRAM) distrib/.gps_wrapper $(DESTDIR)$(bindir)/gps
 endif
 
 test: force