Changeset 2226 in kBuild
- Timestamp:
- Jan 8, 2009 10:31:25 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r2202 r2226 92 92 93 93 # 94 # Where to fine the GNU Make stuff (for FreeBSD and Windows). 95 # 96 PATH_GNUMAKE_SRC ?= $(PATH_ROOT)/src/kmk 97 98 99 # 94 100 # The OS and Architecture indicators. 95 101 # … … 110 116 # Check if we're building a *nix installation. 111 117 # 118 # There are a few optional overrides here for customizing the install location 119 # and how it is installed: 120 # MY_INST_BIN - the bin/ directory (the trailing slash is mandatory). 121 # MY_INST_DATA - the share/kBuild/ directory (the trailing slash is mandatory). 122 # MY_INST_DOC - the share/doc/kBuild-x.y.z/ directory (the trailing slash is mandatory). 123 # MY_INST_UID - the default install UID or user name. 124 # MY_INST_GID - the default install GID or group name. 125 # MY_INST_MODE - the default install mode mask, ",a+x" is added for executables and files. 126 # MY_INST_DATA_UID - data specialization. 127 # MY_INST_DATA_GID - data specialization. 128 # MY_INST_DATA_MODE - data specialization. 129 # MY_INST_DOC_UID - doc specialization. 130 # MY_INST_DOC_GID - doc specialization. 131 # MY_INST_DOC_MODE - doc specialization. 132 # MY_INST_BIN_UID - binary (executable) specialization. 133 # MY_INST_BIN_GID - binary (executable) specialization. 134 # MY_INST_BIN_MODE - binary (executable) specialization. 135 # 136 # When running kmk install, you can use PATH_INS like you use DESTDIR in other makefile 137 # systems. (These things will be improved in 0.2.x btw, so will be possible to enable a 138 # mode where PREFIX and DESTDIR will.) 139 # 140 # 112 141 ifdef NIX_INSTALL_DIR 113 NIX_INSTALL_DIR_BIN := $(patsubst /%,%,$(NIX_INSTALL_DIR))/bin 114 NIX_INSTALL_DIR_SHARE := $(patsubst /%,%,$(NIX_INSTALL_DIR))/share/kBuild 142 MY_INST_ROOT := $(patsubst /%,%,$(NIX_INSTALL_DIR))/ 143 ifndef MY_INST_BIN 144 MY_INST_BIN := $(MY_INST_ROOT)bin/ 145 endif 146 ifndef MY_INST_DATA 147 MY_INST_DATA := $(MY_INST_ROOT)share/kBuild/ 148 endif 149 ifndef MY_INST_DOC 150 MY_INST_DOC := $(MY_INST_ROOT)share/doc/kBuild-$(KBUILD_VERSION)/ 151 endif 152 if !defined(MY_INST_BIN_MODE) && defined(MY_INST_MODE) 153 MY_INST_BIN_MODE := $(MY_INST_MODE),a+x 154 endif 155 115 156 DEFS += \ 116 KBUILD_PATH=\"/$(NIX_INSTALL_DIR_SHARE)\" \ 117 KBUILD_BIN_PATH=\"/$(NIX_INSTALL_DIR_BIN)\" 118 endif 119 120 # 121 # Where to fine the GNU Make stuff (for FreeBSD and Windows). 122 # 123 PATH_GNUMAKE_SRC ?= $(PATH_ROOT)/src/kmk 157 KBUILD_PATH=\"/$(patsubst %/,%,$(MY_INST_DATA))\" \ 158 KBUILD_BIN_PATH=\"/$(patsubst %/,%,$(MY_INST_BIN))\" 159 endif 160 161 162 # 163 # Templates for installing docs and make scripts. 164 # 165 TEMPLATE_DATA = Data installation template. 166 TEMPLATE_DATA_INST = $(MY_INST_DATA) 167 TEMPLATE_DATA_MODE ?= $(firstword $(MY_INST_DATA_MODE) $(MY_INST_MODE) a+r) 168 TEMPLATE_DATA_UID ?= $(firstword $(MY_INST_DATA_UID) $(MY_INST_UID)) 169 TEMPLATE_DATA_GID ?= $(firstword $(MY_INST_DATA_GID) $(MY_INST_GID)) 170 171 TEMPLATE_DOC = Documentation installation template. 172 TEMPLATE_DOC_INST = $(MY_INST_DOC) 173 TEMPLATE_DOC_MODE ?= $(firstword $(MY_INST_DOC_MODE) $(MY_INST_MODE) a+r) 174 TEMPLATE_DOC_UID ?= $(firstword $(MY_INST_DOC_UID) $(MY_INST_UID)) 175 TEMPLATE_DOC_GID ?= $(firstword $(MY_INST_DOC_GID) $(MY_INST_GID)) 124 176 125 177 … … 133 185 TEMPLATE_BIN_DEFS.release = NDEBUG 134 186 if defined(NIX_INSTALL_DIR) && !defined(KBUILD_BOOTSTRAP) 135 TEMPLATE_BIN_INST = $(NIX_INSTALL_DIR_BIN)/ 187 TEMPLATE_BIN_INST = $(MY_INST_BIN) 188 TEMPLATE_BIN_MODE ?= $(firstword $(MY_INST_BIN_MODE) a+rx) 189 TEMPLATE_BIN_UID ?= $(firstword $(MY_INST_BIN_UID) $(MY_INST_UID)) 190 TEMPLATE_BIN_GID ?= $(firstword $(MY_INST_BIN_GID) $(MY_INST_GID)) 136 191 else 137 192 TEMPLATE_BIN_INST = kBuild/bin/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/ 138 193 endif 194 139 195 140 196 ifeq ($(KBUILD_TARGET),os2) -
trunk/Makefile.kmk
r2202 r2226 32 32 ifdef NIX_INSTALL_DIR 33 33 # 34 # When doing a unix install, install all the kBuild scripts. 34 # When doing a unix install, install all the kBuild scripts and docs. 35 # TODO: Make this default and make it possible to disable it for in-tree development. 35 36 # 36 INSTALLS += kBuild 37 kBuild _INST = $(NIX_INSTALL_DIR_SHARE)38 kBuild _SOURCES := \37 INSTALLS += kBuild-data 38 kBuild-data_TEMPLATE = DATA 39 kBuild-data_SOURCES := \ 39 40 $(foreach src,\ 40 41 $(wildcard \ … … 43 44 kBuild/sdks/*.kmk \ 44 45 kBuild/units/*.kmk \ 46 kBuild/msgstyles/*.kmk \ 47 kBuild/templates/*.kmk),\ 48 $(src)=>$(subst kBuild/,,$(src))) 49 50 INSTALLS += kBuild-doc 51 kBuild-doc_TEMPLATE = DOC 52 kBuild-doc_SOURCES := \ 53 $(foreach src,\ 54 $(wildcard \ 45 55 kBuild/doc/*.txt \ 46 56 kBuild/doc/*.html \ 47 kBuild/msgstyles/* \ 48 kBuild/templates/*),\ 49 $(src)=>$(subst kBuild/,,$(src))) 57 ),\ 58 $(src)=>$(subst kBuild/doc/,,$(src))) 50 59 endif 51 60 52 61 # 53 62 # And install any binary only tools and dlls. 63 # TODO: Ship env.sh and envos2.cmd / envwin.cmd where applicable. 54 64 # 55 65 INSTALLS += kBuild_bin
Note:
See TracChangeset
for help on using the changeset viewer.