Commit fef236dd authored by Mikaël Salson's avatar Mikaël Salson

Makefile: make -> $(MAKE)

We should not launch a command directly but use variables instead.
The standard variable for make is $(MAKE). It is therefore more portable
(for instance on freebsd where the make command used should be gmake)
parent 4ebe7ed5
......@@ -11,49 +11,49 @@ else
endif
all:
make COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)
static:
make all LDFLAGS="-static -static-libstdc++"
$(MAKE) all LDFLAGS="-static -static-libstdc++"
test:
make COVERAGE="$(COVERAGE)" unit
make functional
make test_tools_if_python
$(MAKE) COVERAGE="$(COVERAGE)" unit
$(MAKE) functional
$(MAKE) test_tools_if_python
@echo
@echo "*** All tests passed. Congratulations !"
@echo
-(make -C algo/tests snapshot)
-($(MAKE) -C algo/tests snapshot)
test_browser: unit_browser functional_browser
test_server: unit_server
test_tools_if_python:
-(python tools/check_python_version.py && make test_tools)
-(python tools/check_python_version.py && $(MAKE) test_tools)
@(python tools/check_python_version.py || echo "!!! Bad python version, we skip tools tests...")
test_tools:
make -C tools/tests
$(MAKE) -C tools/tests
unit: all
@echo "*** Launching unit tests..."
make COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests
@echo "*** All unit tests passed"
functional: all
make should
make shouldvdj
$(MAKE) should
$(MAKE) shouldvdj
should: all
@echo
@echo "*** Launching .should_get tests..."
make COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests should
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests should
@echo "*** All .should_get tests passed"
shouldvdj: all
@echo
make COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests shouldvdj_if_python
$(MAKE) COVERAGE="$(COVERAGE_OPTION)" -C $(VIDJIL_ALGO_SRC)/tests shouldvdj_if_python
shouldvdj_generate:
@echo
......@@ -78,31 +78,31 @@ shouldvdj_generated_fine: all shouldvdj_generate
python algo/tests/tap-stats.py data/gen/5-*.1.tap
valgrind_unit:
make -C algo/tests valgrind_tests
$(MAKE) -C algo/tests valgrind_tests
valgrind_should:
make -C algo/tests valgrind_should
$(MAKE) -C algo/tests valgrind_should
unit_browser:
make -C browser/test unit
$(MAKE) -C browser/test unit
functional_browser:
make -C browser/test functional
$(MAKE) -C browser/test functional
headless_browser:
make -C browser/test headless
$(MAKE) -C browser/test headless
unit_server:
make -C server/ unit
$(MAKE) -C server/ unit
### Code coverage
coverage: unit_coverage should_coverage
unit_coverage: clean
make COVERAGE=1 unit
$(MAKE) COVERAGE=1 unit
should_coverage: clean
make COVERAGE=1 functional
$(MAKE) COVERAGE=1 functional
### Reports with gcovr
......@@ -130,16 +130,16 @@ cppcheck:
###
data germline: %:
make -C $@
$(MAKE) -C $@
clean:
make -C $(VIDJIL_ALGO_SRC) clean
$(MAKE) -C $(VIDJIL_ALGO_SRC) clean
cleanall: clean
make -C data $^
make -C germline $^
make -C $(VIDJIL_ALGO_SRC) cleanall
make -C server cleanall
$(MAKE) -C data $^
$(MAKE) -C germline $^
$(MAKE) -C $(VIDJIL_ALGO_SRC) cleanall
$(MAKE) -C server cleanall
.PHONY: all test should clean cleanall distrib data germline unit_coverage should_coverage coverage
......@@ -164,7 +164,7 @@ DIST_BROWSER_DIR=vidjil-browser-$(RELEASE_TAG)
TEST_FILES_BROWSER= Makefile $(VIDJIL_BROWSER_SRC)/test/Makefile $(wildcard $(VIDJIL_BROWSER_SRC)/test/*.rb) $(wildcard $(VIDJIL_BROWSER_SRC)/test/QUnit/*) $(wildcard $(VIDJIL_BROWSER_SRC)/test/QUnit/testFiles/*.js)
RELEASE_FILES_BROWSER=$(TEST_FILES_BROWSER) $(wildcard $(VIDJIL_BROWSER_SRC)/*.html) $(wildcard $(VIDJIL_BROWSER_SRC)/js/*.js) $(wildcard $(VIDJIL_BROWSER_SRC)/js/lib/*.js) $(wildcard $(VIDJIL_BROWSER_SRC)/css/*.css)
# make distrib RELEASE_TAG=2013.04alpha
# $(MAKE) distrib RELEASE_TAG=2013.04alpha
distrib:
$(info ==== Release $(RELEASE_TAG) ====)
......@@ -190,11 +190,11 @@ distrib:
# Check archive
cd release && tar xvfz $(RELEASE_ARCHIVE)
cd release/$(DIST_DIR) && make
cd release/$(DIST_DIR) && make germline
cd release/$(DIST_DIR) && make data
cd release/$(DIST_DIR) && make test
cd release/$(DIST_DIR) && make clean && make static && mv vidjil vidjil-$(RELEASE_TAG)_`uname -m`
cd release/$(DIST_DIR) && $(MAKE)
cd release/$(DIST_DIR) && $(MAKE) germline
cd release/$(DIST_DIR) && $(MAKE) data
cd release/$(DIST_DIR) && $(MAKE) test
cd release/$(DIST_DIR) && $(MAKE) clean && $(MAKE) static && mv vidjil vidjil-$(RELEASE_TAG)_`uname -m`
release_browser:
......@@ -222,7 +222,7 @@ release_browser:
# Check archive
cd release && tar xvfz $(RELEASE_BROWSER_ARCHIVE)
cd release/$(DIST_BROWSER_DIR) && make unit_browser
cd release/$(DIST_BROWSER_DIR) && $(MAKE) unit_browser
......@@ -43,15 +43,15 @@ all: $(VIDJIL) $(ALIGN_CGI)
###
paranoid: clean
make vidjil OPTIM="$(PARANOID)"
$(MAKE) vidjil OPTIM="$(PARANOID)"
###
kmers: cleankmers
make CONFIG="-DDEBUG_KMERS"
$(MAKE) CONFIG="-DDEBUG_KMERS"
nokmers: cleankmers
make
$(MAKE)
cleankmers:
rm -f vidjil.o core/windowExtractor.o core/segment.o
......@@ -59,10 +59,10 @@ cleankmers:
###
spaced: cleanspaced
make
$(MAKE)
nospaced: cleanspaced
make CONFIG="-DNO_SPACED_SEEDS"
$(MAKE) CONFIG="-DNO_SPACED_SEEDS"
cleanspaced:
rm -f vidjil.o core/tools.o
......@@ -71,17 +71,17 @@ cleanspaced:
$(ALIGN_CGI): cgi/align.o $(LIBCORE)
mkdir -p $(CGIDIR)
make -C core OPTIM="$(OPTIM)"
$(MAKE) -C core OPTIM="$(OPTIM)"
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
###
debug:
make clean
make DEBUG="-ggdb"
$(MAKE) clean
$(MAKE) DEBUG="-ggdb"
$(VIDJIL): $(BINDIR)%: %.o $(LIBCORE)
make -C core OPTIM="$(OPTIM)"
make -C lib OPTIM="$(OPTIM)"
$(MAKE) -C core OPTIM="$(OPTIM)"
$(MAKE) -C lib OPTIM="$(OPTIM)"
$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS) $(CXXFLAGS)
###
......@@ -89,30 +89,30 @@ $(VIDJIL): $(BINDIR)%: %.o $(LIBCORE)
###
core/%.a: FORCE
make -C core $(notdir $@)
$(MAKE) -C core $(notdir $@)
lib/%.a: FORCE
make -C lib $(notdir $@)
$(MAKE) -C lib $(notdir $@)
clean:
make -C core $@
make -C lib $@
$(MAKE) -C core $@
$(MAKE) -C lib $@
rm -f *.o cgi/*.o
cd $(BINDIR) ; rm -f $(EXEC)
make -C tests $@
$(MAKE) -C tests $@
cleancoverage: clean
rm -f *.gcda *.gcno *.gcov
make -C core cleancoverage
make -C lib cleancoverage
$(MAKE) -C core cleancoverage
$(MAKE) -C lib cleancoverage
cleanall: cleancoverage
make -C tests cleanall
$(MAKE) -C tests cleanall
forcedep:
g++ $(CXXFLAGS) -M $(MAINCORE) > dep.mk
make -C core forcedep
make -C lib forcedep
$(MAKE) -C core forcedep
$(MAKE) -C lib forcedep
FORCE:
......
......@@ -37,7 +37,7 @@ snapshot:
should: vidjil $(SHOULD_LOG)
shouldvdj_if_python:
-(python ../../tools/check_python_version.py && make shouldvdj)
-(python ../../tools/check_python_version.py && $(MAKE) shouldvdj)
@(python ../../tools/check_python_version.py || echo "!!! Bad python version, we skip .should-vdj.fa tests...")
shouldvdj: vidjil
......@@ -50,11 +50,11 @@ shouldvdj: vidjil
./should-to-tap.sh $<
valgrind_should:
make -C $(REPORTS_PATH) clean_valgrind
LAUNCHER="$(VALGRIND)" make should
$(MAKE) -C $(REPORTS_PATH) clean_valgrind
LAUNCHER="$(VALGRIND)" $(MAKE) should
valgrind_%:
LAUNCHER="$(VALGRIND)" make $(patsubst valgrind_%,%,$@)
LAUNCHER="$(VALGRIND)" $(MAKE) $(patsubst valgrind_%,%,$@)
valgrind_tests: vidjil tests
$(VALGRIND) ./tests
......@@ -66,11 +66,11 @@ $(EXEC): % : %.o $(LIB)
../core.a: core
vidjil:
make -C ../ clean
make -C ../ OPTIM="$(OPTIM)"
$(MAKE) -C ../ clean
$(MAKE) -C ../ OPTIM="$(OPTIM)"
core:
make -C ../core
$(MAKE) -C ../core
%.o: %.cpp $(OTHER_SRC)
$(CC) -o $@ $(INCLUDE) -c $< $(CXXFLAGS)
......
......@@ -11,7 +11,7 @@ LIBCORE=../core/vidjil.a ../lib/lib.a
all: $(EXEC)
$(EXEC): %: %.o
make -C .. OPTIM="$(OPTIM)"
$(MAKE) -C .. OPTIM="$(OPTIM)"
$(CC) -I .. -o $@ $^ $(LIBCORE) $(LDLIBS)
clean:
......
......@@ -11,5 +11,5 @@ light.css: light.less vidjil.less
no:
make LESSC="./node lessc"
$(MAKE) LESSC="./node lessc"
......@@ -4,7 +4,7 @@ all: unit functional
unit: phantomjs
headless:
HEADLESS=1 make functional
HEADLESS=1 $(MAKE) functional
functional: ../../doc/analysis-example1.vidjil
ruby test_browser.rb
......@@ -16,6 +16,6 @@ phantomjs:
cd QUnit ; phantomjs phantom_test.js
../../doc/%:
make -C ../../doc $@
$(MAKE) -C ../../doc $@
.PHONY: phantomjs unit functional headless all
......@@ -8,7 +8,7 @@ germline:
get-all-data:
sh get-germline
make ../browser/js/germline.js
$(MAKE) ../browser/js/germline.js
clean:
rm -f $(DATA)
......@@ -4,7 +4,7 @@ TAP=$(SHOULD:.should_get=.tap)
all: $(TAP) doctests
fuse-doc.tap: fuse-doc.should_get force
make -C ../../doc analysis-example1.vidjil
$(MAKE) -C ../../doc analysis-example1.vidjil
./should-to-tap.sh $<
%.tap: %.should_get force
......
Markdown is supported
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