diff options
| author | Martin Bodin | 2020-05-22 10:53:19 +0100 |
|---|---|---|
| committer | Enrico Tassi | 2020-05-27 21:53:25 +0200 |
| commit | 9514c7dbf5a2691603a916d11ab38a34d600e501 (patch) | |
| tree | e24769b5977d157b25a95d97f7d7986bacfdba90 /tools | |
| parent | 35e175710795974a4a38c8a7d6da6a5ccaf8de74 (diff) | |
Promoting COQLIBINSTALL and COQDOCINSTALL in coq_makefile to the parameters section.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/CoqMakefile.in | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/CoqMakefile.in b/tools/CoqMakefile.in index a26eb9dfbe..8b0a37ee3c 100644 --- a/tools/CoqMakefile.in +++ b/tools/CoqMakefile.in @@ -146,6 +146,20 @@ TIME_OF_PRETTY_BUILD_EXTRA_FILES ?= - # also output to the command line TGTS ?= +# Retro compatibility (DESTDIR is standard on Unix, DSTROOT is not) +ifdef DSTROOT +DESTDIR := $(DSTROOT) +endif + +# Substitution of the path by appending $(DESTDIR) if needed. +# The variable $(COQMF_WINDRIVE) can be needed for Cygwin environments. +destination_path = $(if $(DESTDIR),$(DESTDIR)/$(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(1)),$(1)),$(1)) + +# Installation paths of libraries and documentation. +COQLIBINSTALL ?= $(call destination_path,$(COQLIB)/user-contrib) +COQDOCINSTALL ?= $(call destination_path,$(DOCDIR)/user-contrib) +COQTOPINSTALL ?= $(call destination_path,$(COQLIB)/toploop) # FIXME: Unused variable? + ########## End of parameters ################################################## # What follows may be relevant to you only if you need to # extend this Makefile. If so, look for 'Extension point' here and @@ -227,17 +241,6 @@ else TIMING_ARG= endif -# Retro compatibility (DESTDIR is standard on Unix, DSTROOT is not) -ifdef DSTROOT -DESTDIR := $(DSTROOT) -endif - -concat_path = $(if $(1),$(1)/$(if $(COQMF_WINDRIVE),$(subst $(COQMF_WINDRIVE),/,$(2)),$(2)),$(2)) - -COQLIBINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)/user-contrib) -COQDOCINSTALL = $(call concat_path,$(DESTDIR),$(DOCDIR)/user-contrib) -COQTOPINSTALL = $(call concat_path,$(DESTDIR),$(COQLIB)/toploop) - # Files ####################################################################### # # We here define a bunch of variables about the files being part of the @@ -577,7 +580,7 @@ uninstall:: instf="$(COQLIBINSTALL)/$$df/`basename $$f`" &&\ rm -f "$$instf" &&\ echo RM "$$instf" &&\ - (rmdir "$(call concat_path,,$(COQLIBINSTALL)/$$df/)" 2>/dev/null || true); \ + (rmdir "$(COQLIBINSTALL)/$$df/" 2>/dev/null || true); \ done .PHONY: uninstall |
