Skip to content
Snippets Groups Projects
Commit d4474667 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added primitive control for inter-module dependence

parent c1485041
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
dir=$1
msg="ERROR: this module depends on $dir, which is presently disabled"
cd ../
if test -f $dir/module.type
then
case "$(cat "$dir/module.type")" in
(always) exit 0 ;;
(default-on)
if test -f $dir.off
then
echo "$msg"
exit 1
else
exit 0
fi ;;
(default-off)
if test -f $dir.on
then
exit 0
else
echo "$msg"
exit 1
fi ;;
esac
fi
......@@ -25,6 +25,7 @@ DEP=$(addprefix deps/,$(SRC:.cpp=.d))
all:
@echo Creating links to other here to simplify .h inclusion:
@for dir in $(USE) ; do test -L $$dir || ln -s ../$$dir . && echo " " $$dir ; done
@for dir in $(USE) ; do ../maketools/check_module.sh $$dir ; done
@echo Building dependencies
@for dir in $(BUILDAFTER) ; do echo " " $$dir ; cd ../$$dir ; $(MAKE) ; cd - ; done
$(MAKE) obj
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment