summarylogtreecommitdiffstats
path: root/Makefile.patch
blob: 0a61b414c7647944d29221a36899e480618de6a6 (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
--- Makefile	2019-03-28 19:51:22.546637034 -0400
+++ Makefile.fixed	2019-04-27 00:14:54.922847839 -0400
@@ -238,23 +238,23 @@
 	@$(COQDEP) $^ > .depend
 
 install:
-	install -d $(BINDIR)
-	install -m 0755 ./ccomp $(BINDIR)
-	install -d $(SHAREDIR)
-	install -m 0644 ./compcert.ini $(SHAREDIR)
-	install -d $(MANDIR)/man1
-	install -m 0644 ./doc/ccomp.1 $(MANDIR)/man1
+	install -d $(DESTDIR)/$(BINDIR)
+	install -m 0755 ./ccomp $(DESTDIR)/$(BINDIR)
+	install -d $(DESTDIR)/$(SHAREDIR)
+	install -m 0644 ./compcert.ini $(DESTDIR)/$(SHAREDIR)
+	install -d $(DESTDIR)/$(MANDIR)/man1
+	install -m 0644 ./doc/ccomp.1 $(DESTDIR)/$(MANDIR)/man1
 	$(MAKE) -C runtime install
 ifeq ($(CLIGHTGEN),true)
-	install -m 0755 ./clightgen $(BINDIR)
+	install -m 0755 ./clightgen $(DESTDIR)/$(BINDIR)
 endif
 ifeq ($(INSTALL_COQDEV),true)
-	install -d $(COQDEVDIR)
+	install -d $(DESTDIR)/$(COQDEVDIR)
 	for d in $(DIRS); do \
-          install -d $(COQDEVDIR)/$$d && \
-          install -m 0644 $$d/*.vo $(COQDEVDIR)/$$d/; \
+          install -d $(DESTDIR)/$(COQDEVDIR)/$$d && \
+          install -m 0644 $$d/*.vo $(DESTDIR)/$(COQDEVDIR)/$$d/; \
 	done
-	install -m 0644 ./VERSION $(COQDEVDIR)
+	install -m 0644 ./VERSION $(DESTDIR)/$(COQDEVDIR)
 	@(echo "To use, pass the following to coq_makefile or add the following to _CoqProject:"; echo "-R $(COQDEVDIR) compcert") > $(COQDEVDIR)/README
 endif