llvm.org GIT mirror llvm / 32b1691
For PR739: Support overriding the prefix and DESTDIR variables from the make command line. This makes the makefile system a little more GNU compliant and the feature makes it easier for distribution builders to re-target the install location of LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33305 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 12 years ago
1 changed file(s) with 13 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
4646 LLVM_OBJ_ROOT := $(shell cd @abs_top_builddir@; $(PWD))
4747 PROJ_SRC_ROOT := $(shell cd $(LLVM_SRC_ROOT); $(PWD))
4848 PROJ_SRC_DIR := $(shell cd $(LLVM_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
49 DESTDIR := @prefix@
50 PROJ_prefix := $(DESTDIR)
51 PROJ_bindir := $(DESTDIR)/bin
52 PROJ_libdir := $(DESTDIR)/lib
53 PROJ_datadir := $(DESTDIR)/share
54 PROJ_docsdir := $(DESTDIR)/docs/llvm
55 PROJ_etcdir := $(DESTDIR)/etc/llvm
56 PROJ_includedir := $(DESTDIR)/include
57 PROJ_infodir := $(DESTDIR)/info
58 PROJ_mandir := $(DESTDIR)/man
49 prefix := @prefix@
50 PROJ_prefix := $(prefix)
5951 PROJ_VERSION := $(LLVMVersion)
6052 else
6153 ifndef PROJ_SRC_ROOT
7466 $(error Projects must define LLVM_OBJ_ROOT)
7567 endif
7668 PROJ_SRC_DIR := $(shell cd $(PROJ_SRC_ROOT)/$(patsubst $(PROJ_OBJ_ROOT)%,%,$(PROJ_OBJ_DIR)); $(PWD))
77 PROJ_prefix := $(PROJ_INSTALL_ROOT)
78 PROJ_bindir := $(PROJ_INSTALL_ROOT)/bin
79 PROJ_libdir := $(PROJ_INSTALL_ROOT)/lib
80 PROJ_datadir := $(PROJ_INSTALL_ROOT)/share
81 PROJ_docsdir := $(PROJ_INSTALL_ROOT)/docs/llvm
82 PROJ_etcdir := $(PROJ_INSTALL_ROOT)/etc/llvm
83 PROJ_includedir := $(PROJ_INSTALL_ROOT)/include
84 PROJ_infodir := $(PROJ_INSTALL_ROOT)/info
85 PROJ_mandir := $(PROJ_INSTALL_ROOT)/man
69 prefix := $(PROJ_INSTALL_ROOT)
70 PROJ_prefix := $(prefix)
8671 ifndef PROJ_VERSION
8772 PROJ_VERSION := 1.0
8873 endif
8974 endif
75
76 PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/bin
77 PROJ_libdir := $(DESTDIR)$(PROJ_prefix)/lib
78 PROJ_datadir := $(DESTDIR)$(PROJ_prefix)/share
79 PROJ_docsdir := $(DESTDIR)$(PROJ_prefix)/docs/llvm
80 PROJ_etcdir := $(DESTDIR)$(PROJ_prefix)/etc/llvm
81 PROJ_includedir := $(DESTDIR)$(PROJ_prefix)/include
82 PROJ_infodir := $(DESTDIR)$(PROJ_prefix)/info
83 PROJ_mandir := $(DESTDIR)$(PROJ_prefix)/man
9084
9185 # Determine if we're on a unix type operating system
9286 LLVM_ON_UNIX:=@LLVM_ON_UNIX@