Skip to content

Commit f54d75b

Browse files
author
Jon Ludlam
committed
Make a file fhs.ml containing important paths that will change as part of the FHS compliance work
Signed-off-by: Jon Ludlam <[email protected]>
1 parent 2f9cab2 commit f54d75b

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

Makefile

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ COMPILE_NATIVE=yes
2323
COMPILE_BYTE=no # bytecode version does not build
2424
export COMPILE_NATIVE COMPILE_BYTE
2525

26+
# FHS stuff
27+
VARDIR=/var/xapi
28+
VARPATCHDIR=/var/patch
29+
ETCDIR=/etc/xensource
30+
OPTDIR=/opt/xensource
31+
PLUGINDIR=/etc/xapi.d/plugins
32+
HOOKSDIR=/etc/xapi.d
33+
INVENTORY=/etc/xensource-inventory
34+
XAPICONF=/etc/xapi.conf
35+
LIBEXECDIR=$(OPTDIR)/libexec
36+
SCRIPTSDIR=/etc/xensource/scripts
37+
38+
export VARDIR ETCDIR OPTDIR PLUGINDIR HOOKSDIR INVENTORY VARPATCHDIR LIBEXECDIR XAPICONF SCRIPTSDIR
39+
2640
.PHONY: all
2741
all: version
2842
omake phase1
@@ -91,7 +105,21 @@ version:
91105
let xapi_version_minor = $(shell cut -d. -f2 VERSION) \n" \
92106
> ocaml/util/version.ml
93107

94-
.PHONY: clean
108+
ocaml/fhs.ml :
109+
@printf "(* This file is autogenerated by xen-api.git/Makefile *)\n \
110+
let vardir=\"$(VARDIR)\"\n \
111+
let etcdir=\"$(ETCDIR)\"\n \
112+
let optdir=\"$(OPTDIR)\"\n \
113+
let plugindir=\"$(PLUGINDIR)\"\n \
114+
let inventory=\"$(INVENTORY)\"\n \
115+
let hooksdir=\"$(HOOKSDIR)\"\n \
116+
let libexecdir=\"$(LIBEXECDIR)\"\n \
117+
let xapiconf=\"$(XAPICONF)\"\n \
118+
let scriptsdir=\"$(SCRIPTSDIR)\"\n \
119+
let varpatchdir=\"$(VARPATCHDIR)\"\n" \
120+
> ocaml/fhs.ml
121+
122+
.PHONY: clean
95123
clean:
96124

97125
.PHONY: xapi.spec

0 commit comments

Comments
 (0)