aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBernhard Schommer <bschommer@users.noreply.github.com>2019-05-17 17:30:03 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-05-17 17:30:03 +0200
commit5b7fc96afb149ad916a9bf5015fe1eb2e0baaa7c (patch)
tree03ec4c313a1b7f220e37bd924082565a0a4df6a8 /Makefile
parent99918e4118e0ea644b20e37a13ceb31d935fdda5 (diff)
downloadcompcert-5b7fc96afb149ad916a9bf5015fe1eb2e0baaa7c.tar.gz
compcert-5b7fc96afb149ad916a9bf5015fe1eb2e0baaa7c.zip
Prepend $(DESTDIR) to the installation target (#169)
Following the gnu Makefile Conventions the variable $(DESTDIR) should be prepended to all installation commands. This allows staged installs.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 12 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index dc98e7a0..8ab6b5b0 100644
--- a/Makefile
+++ b/Makefile
@@ -235,24 +235,24 @@ depend1: $(FILES) exportclight/Clightdefs.v
@$(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)
- @(echo "To use, pass the following to coq_makefile or add the following to _CoqProject:"; echo "-R $(COQDEVDIR) compcert") > $(COQDEVDIR)/README
+ 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") > $(DESTDIR)$(COQDEVDIR)/README
endif