summarylogtreecommitdiffstats
path: root/makefile-installdir-fixes.diff
blob: 080060b71153bbe8da949ff5d5688812503c56e3 (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
diff --git a/Makefile b/Makefile
index d1f314054..a4d375d24 100644
--- a/Makefile
+++ b/Makefile
@@ -36,7 +36,6 @@
 INSTALLDIR=$(CURDIR)/install
 SHAREDIR=$(INSTALLDIR)/share
 INCLUDEDIR=$(INSTALLDIR)/include/spark
-LIBDIR=$(INSTALLDIR)/lib/gnat
 EXAMPLESDIR=$(SHAREDIR)/examples/spark
 DOCDIR=$(SHAREDIR)/doc/spark
 GNATPROVEDIR=$(SHAREDIR)/spark
@@ -84,22 +83,21 @@ install-all:
 	# does (in anod scripts), as why3 executables expect this relative
 	# location to find the Why3 installation files in share. Do this for
 	# all internal binaries even if not strictly needed.
-	mkdir -p install/libexec/spark/bin
-	$(MV) install/bin/why3server install/libexec/spark/bin
-	$(MV) install/bin/why3realize install/libexec/spark/bin
-	$(MV) install/bin/gnatwhy3 install/libexec/spark/bin
-	$(MV) install/bin/gnat_server install/libexec/spark/bin
-	$(MV) install/bin/why3config install/libexec/spark/bin
-	$(MV) install/bin/why3session install/libexec/spark/bin
+	install -Dm0755 install/bin/why3server $(INSTALLDIR)/lib/spark/bin/why3server
+	install -Dm0755 install/bin/why3realize $(INSTALLDIR)/lib/spark/bin/why3realize
+	install -Dm0755 install/bin/gnatwhy3 $(INSTALLDIR)/lib/spark/bin/gnatwhy3
+	install -Dm0755 install/bin/gnat_server $(INSTALLDIR)/lib/spark/bin/gnat_server
+	install -Dm0755 install/bin/why3config $(INSTALLDIR)/lib/spark/bin/why3config
+	install -Dm0755 install/bin/why3session $(INSTALLDIR)/lib/spark/bin/why3session
 	# the following line is allowed to fail - why3ide might not be
 	# installed
-	-$(MV) install/bin/why3ide install/libexec/spark/bin
+	-install -Dm0755 install/bin/why3ide $(INSTALLDIR)/lib/spark/bin/why3ide
 	# Create the fake prover scripts to help extract benchmarks.
-	$(CP) benchmark_script/fake_* install/libexec/spark/bin
+	install -Dm0755 -t $(INSTALLDIR)/lib/spark/bin benchmark_script/fake_*
 
 install:
 	mkdir -p $(INSTALLDIR)/bin $(CONFIGDIR) $(THEORIESDIR) \
-	  $(RUNTIMESDIR) $(INCLUDEDIR) $(LIBDIR)
+	  $(RUNTIMESDIR) $(INCLUDEDIR) $(INSTALLDIR)/lib/gnat
 	@echo "Generate default target.atp in $(INSTALLDIR)/bin:"
 	$(GNATMAKE) -q -c -u -gnats spark2014vsn.ads \
 	  -gnatet=$(INSTALLDIR)/bin/target.atp
@@ -111,8 +109,8 @@ install:
 	@echo "Generate Coq files by preprocessing context files:"
 	$(MAKE) -C include generate
 	$(CP) include/*.ad? $(INCLUDEDIR)
-	$(CP) include/*.gpr $(LIBDIR)
-	$(CP) include/proof $(LIBDIR)
+	$(CP) include/*.gpr $(INSTALLDIR)/lib/gnat
+	$(CP) include/proof $(INSTALLDIR)/lib/gnat
 
 doc: $(DOC)