Commit 3d6e2838 authored by Michel Roelofs's avatar Michel Roelofs
Browse files

Add make rules for building release tar files for console and controller

The build is done in a separate, clean, directory. This is freshly checked
out from Git, and then in this directory controller, console, or both
are built. The result is stored in a tar file in the original directory from
where make is invoked.
parent 6714265c
.PHONY: clean all rel_mktemp_dir
CONTROLLER_REL_TAR:=$(CURDIR)/controller_$(shell date +%Y%m%d%H%M).tar.gz
CONSOLE_REL_TAR:=$(CURDIR)/console_$(shell date +%Y%m%d%H%M).tar.gz
$(MAKE) -C common/utils
......@@ -6,6 +10,17 @@ all:
cd libnova-0.13.0 ; ./configure -enable-static -disable-shared --prefix=${CURDIR} ; make; make install
$(MAKE) -C console
$(MAKE) -C common/utils
$(MAKE) -C common/trace
$(MAKE) -C controller
$(MAKE) -C common/utils
$(MAKE) -C common/trace
cd libnova-0.13.0 ; ./configure -enable-static -disable-shared --prefix=${CURDIR} ; make; make install
$(MAKE) -C console
$(MAKE) -C common/utils clean
$(MAKE) -C common/trace clean
......@@ -13,4 +28,55 @@ clean:
cd libnova-0.13.0 ; make clean || true
$(MAKE) -C console clean
# Rules for building a release
$(eval REL_BUILD_DIR:=$(shell mktemp -d /tmp/dt_ctrl_XXXXXX))
@echo "****** Building code in dir: $(REL_BUILD_DIR)"
rel_clone_dir: rel_mktemp_dir
@echo "****** Creating clean checkout of source"; \
git clone . $(REL_BUILD_DIR) >/dev/null; \
echo " Done"
rel_utils: rel_clone_dir
@echo "****** Building common/utils"; \
$(MAKE) -C $(REL_BUILD_DIR)/common/utils >/dev/null; \
echo " Done"
rel_trace: rel_utils
@echo "****** Building common/trace"; \
$(MAKE) -C $(REL_BUILD_DIR)/common/trace >/dev/null; \
echo " Done"
rel_ctrl: rel_trace
@echo "****** Building controller"; \
$(MAKE) -C $(REL_BUILD_DIR)/controller >/dev/null; \
echo " Done"
rel_libnova: rel_clone_dir
@echo "****** Building libnova"; \
(cd $(REL_BUILD_DIR)/libnova-0.13.0 ; ./configure -enable-static -disable-shared --prefix=$(REL_BUILD_DIR); make; make install) >/dev/null; \
echo " Done"
rel_cons: rel_trace rel_libnova
@echo "****** Building console"; \
$(MAKE) -C $(REL_BUILD_DIR)/console >/dev/null; \
echo " Done"
$(CONSOLE_REL_TAR): rel_cons
@tar -C $(REL_BUILD_DIR)/release -zhcf $@ console
@echo "****** Created console release file $@"
@tar -C $(REL_BUILD_DIR)/release -zhcf $@ controller
@echo "****** Created controller release file $@"
release_console: $(CONSOLE_REL_TAR)
release_controller: $(CONTROLLER_REL_TAR)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment