[vlfeat] 34/44: [bugfix] makefile.mak: fixes compilation when a certain directory was not initially present

Dima Kogan dima at secretsauce.net
Wed Sep 16 21:05:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch master
in repository vlfeat.

commit a9cce0107efdb2a5200787acb594d0a81ca986ae
Author: Andrea Vedaldi <vedaldi at gmail.com>
Date:   Thu Jan 15 00:40:17 2015 +0000

    [bugfix] makefile.mak: fixes compilation when a certain directory was not initially present
---
 Makefile        |  6 +++---
 make/doc.mak    |  2 +-
 make/matlab.mak | 14 ++++++++++----
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index cf0a5a5..9f0655a 100644
--- a/Makefile
+++ b/Makefile
@@ -321,6 +321,9 @@ endef
 # inclued by make as auto-dependencies) and the list of files to be
 # added to the binary distribution.
 
+.PHONY: clean, archclean, distclean, info, help
+no_dep_targets := clean archclean distclean info help
+
 include make/dll.mak
 include make/bin.mak
 include make/matlab.mak
@@ -328,9 +331,6 @@ include make/octave.mak
 include make/doc.mak
 include make/dist.mak
 
-.PHONY: clean, archclean, distclean, info, help
-no_dep_targets += clean archclean distclean info help
-
 clean:
 	rm -f  `find . -name '*~'`
 	rm -f  `find . -name '.DS_Store'`
diff --git a/make/doc.mak b/make/doc.mak
index 6ec8d7d..ce3ac9b 100644
--- a/make/doc.mak
+++ b/make/doc.mak
@@ -300,7 +300,7 @@ doc/index.html: $(webdoc_src) $(doc-dir) \
 # --------------------------------------------------------------------
 
 .PHONY: doc-clean, doc-archclean, doc-distclean
-no_dep_targets := doc-clean doc-archclean doc-distclean
+no_dep_targets += doc-clean doc-archclean doc-distclean
 
 VERSION: vl/generic.h
 	echo "$(VER)" > VERSION
diff --git a/make/matlab.mak b/make/matlab.mak
index 91f2077..4c211b9 100644
--- a/make/matlab.mak
+++ b/make/matlab.mak
@@ -61,8 +61,11 @@ endif
 
 MEX_BINDIR := toolbox/mex/$(MEX_SUFFIX)
 
+# generate the mex-dir target
+$(eval $(call gendir, mex, $(MEX_BINDIR)))
+
 # Cache an integer representing MATLAB's version
-$(MEX_BINDIR)/matlabver.mak:
+$(MEX_BINDIR)/matlabver.mak: $(mex-dir)
 	rm -f "$(MEX_BINDIR)/matlabver.mak"
 	$(MATLAB_EXE) -nodesktop -nosplash -nojvm \
 	-r \
@@ -70,17 +73,23 @@ $(MEX_BINDIR)/matlabver.mak:
 "fprintf(f,'MATLAB_VER=%d\n',[1e4 1e2 1]*sscanf(version,'%d.%d.%d'));fclose(f);exit();"
 
 ifdef MATLAB_PATH
+ifeq ($(filter $(no_dep_targets), $(MAKECMDGOALS)),)
 -include $(MEX_BINDIR)/matlabver.mak
 endif
+endif
 
 ifeq ($(call gt,$(MATLAB_VER),80300),)
 # new style
 $(info Detected MATLAB 2014a or greater: adjusting escape method for MEX)
 escape =$(1)
 else
+ifeq ($(call gt,$(MATLAB_VER),1),)
 # old style
 $(info Detected MATLAB 2013b or earlier: adjusting escape method for MEX)
 escape =$(subst $$,\\$$,$(1))
+else
+$(info The MALTAB version will be detected in the next phase of Make)
+endif
 endif
 
 # --------------------------------------------------------------------
@@ -223,9 +232,6 @@ vpath vl_%.c $(mex_sub)
 
 mex-all: $(mex_dll) $(mex_tgt)
 
-# generate the mex-dir target
-$(eval $(call gendir, mex, $(MEX_BINDIR)))
-
 # Create a copy of the VLFeat DLL that links to MATLAB OpenMP library
 # (Intel OMP 5) rather than the system one. The Intel library is
 # binary compatible with GCC. This avoids running two OpenMP

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/vlfeat.git



More information about the debian-science-commits mailing list