Correct paths in moxerverctl and adapt Makefiles
This commit is contained in:
parent
ee5aaa2690
commit
ce8971eb2b
4 changed files with 16 additions and 23 deletions
11
Makefile
11
Makefile
|
@ -2,10 +2,8 @@
|
||||||
SERVER = moxerver
|
SERVER = moxerver
|
||||||
TOOLS = tools
|
TOOLS = tools
|
||||||
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
# system install root directory
|
# system install root directory
|
||||||
INSTALL_ROOT = ./install.dir
|
INSTALL_ROOT = $(abspath ./install.dir)
|
||||||
|
|
||||||
# prefix for /bin directory
|
# prefix for /bin directory
|
||||||
BIN_PREFIX = /usr
|
BIN_PREFIX = /usr
|
||||||
|
@ -14,9 +12,8 @@ BIN_PREFIX = /usr
|
||||||
|
|
||||||
# directories used for local component builds
|
# directories used for local component builds
|
||||||
BUILDDIR = build.dir
|
BUILDDIR = build.dir
|
||||||
INSTALLDIR = install.dir
|
|
||||||
# directory configuration for local component builds
|
# directory configuration for local component builds
|
||||||
DIR_CONFIG = BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR) BIN_PREFIX=$(BIN_PREFIX)
|
DIR_CONFIG = BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALL_ROOT) BIN_PREFIX=$(BIN_PREFIX)
|
||||||
|
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
|
@ -34,12 +31,8 @@ default:
|
||||||
# install handles component installation
|
# install handles component installation
|
||||||
install: default
|
install: default
|
||||||
mkdir -p $(INSTALL_ROOT)
|
mkdir -p $(INSTALL_ROOT)
|
||||||
|
|
||||||
cd $(SERVER) && make install $(DIR_CONFIG)
|
cd $(SERVER) && make install $(DIR_CONFIG)
|
||||||
cp -r $(SERVER)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
|
|
||||||
|
|
||||||
cd $(TOOLS) && make install $(DIR_CONFIG)
|
cd $(TOOLS) && make install $(DIR_CONFIG)
|
||||||
cp -r $(TOOLS)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
|
|
||||||
|
|
||||||
# clean removes build and install results
|
# clean removes build and install results
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -4,9 +4,9 @@ TARGET_BINARY = moxerver
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# directory for build results
|
# directory for build results
|
||||||
BUILDDIR = build.dir
|
BUILDDIR = $(abspath build.dir)
|
||||||
# installation root
|
# installation root
|
||||||
INSTALLDIR = install.dir
|
INSTALLDIR = $(abspath install.dir)
|
||||||
# prefix for /bin directory
|
# prefix for /bin directory
|
||||||
BIN_PREFIX = /usr
|
BIN_PREFIX = /usr
|
||||||
|
|
||||||
|
@ -57,8 +57,7 @@ default: $(BUILDDIR)/$(TARGET_BINARY)
|
||||||
|
|
||||||
# install target binary
|
# install target binary
|
||||||
install: default
|
install: default
|
||||||
mkdir -p $(INSTALLDIR)/$(BIN_PREFIX)/bin
|
install -Dm0755 $(BUILDDIR)/$(TARGET_BINARY) $(INSTALLDIR)/$(BIN_PREFIX)/bin/$(TARGET_BINARY)
|
||||||
cp $(BUILDDIR)/$(TARGET_BINARY) $(INSTALLDIR)/$(BIN_PREFIX)/bin
|
|
||||||
|
|
||||||
# clean removes object files and target (ignore errors with "-" before commands)
|
# clean removes object files and target (ignore errors with "-" before commands)
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -5,9 +5,9 @@ TARGET_CONFIG = moxerver.cfg
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
# directory for build results
|
# directory for build results
|
||||||
BUILDDIR = build.dir
|
BUILDDIR = $(abspath build.dir)
|
||||||
# installation root
|
# installation root
|
||||||
INSTALLDIR = install.dir
|
INSTALLDIR = $(abspath install.dir)
|
||||||
# prefix for /bin directory
|
# prefix for /bin directory
|
||||||
BIN_PREFIX = /usr
|
BIN_PREFIX = /usr
|
||||||
|
|
||||||
|
@ -21,12 +21,11 @@ default:
|
||||||
|
|
||||||
# install targets
|
# install targets
|
||||||
install:
|
install:
|
||||||
# install control script
|
|
||||||
mkdir -p $(INSTALLDIR)/$(BIN_PREFIX)/bin
|
|
||||||
cp $(TARGET_CONTROL) $(INSTALLDIR)/$(BIN_PREFIX)/bin/
|
|
||||||
# install configuration file
|
# install configuration file
|
||||||
mkdir -p $(INSTALLDIR)/etc
|
install -Dm0644 $(TARGET_CONFIG) $(INSTALLDIR)/etc/$(TARGET_CONFIG)
|
||||||
cp $(TARGET_CONFIG) $(INSTALLDIR)/etc/
|
# install control script, referring to the configuration file
|
||||||
|
install -Dm0755 $(TARGET_CONTROL) $(INSTALLDIR)/$(BIN_PREFIX)/bin/$(TARGET_CONTROL)
|
||||||
|
sed -i -e 's#ROOT=\"\"#ROOT=$(INSTALLDIR)#' $(INSTALLDIR)/$(BIN_PREFIX)/bin/$(TARGET_CONTROL)
|
||||||
|
|
||||||
# clean removes object files and target (ignore errors with "-" before commands)
|
# clean removes object files and target (ignore errors with "-" before commands)
|
||||||
clean:
|
clean:
|
||||||
|
|
8
tools/moxerverctl
Executable file → Normal file
8
tools/moxerverctl
Executable file → Normal file
|
@ -4,10 +4,12 @@
|
||||||
# setup
|
# setup
|
||||||
# =====
|
# =====
|
||||||
|
|
||||||
|
ROOT=""
|
||||||
|
|
||||||
# parameters
|
# parameters
|
||||||
CONFIGURATION_FILE="./moxanix.cfg"
|
CONFIGURATION_FILE="$ROOT/etc/moxerver.cfg"
|
||||||
SERVER_BINARY="./moxerver"
|
SERVER_BINARY="moxerver"
|
||||||
LOG_DIRECTORY="./logs"
|
LOG_DIRECTORY="$ROOT/var/logs/moxerver"
|
||||||
|
|
||||||
|
|
||||||
# global variables for configuration
|
# global variables for configuration
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue