@@ -8,9 +8,10 @@ define shell-functions
8
8
9
9
: END
10
10
endef
11
-
11
+ mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST ) ) )
12
+ current_dir := $(notdir $(patsubst % /,% ,$(dir $(mkfile_path ) ) ) )
12
13
# Generate the file with function declarations for the shell
13
- $(shell sed -n '/^ : BEGIN/,/^: END/p' ./Makefile > .functions.sh && chmod 777 .functions.sh)
14
+ $(shell sed -n '/^ : BEGIN/,/^: END/p' "${mkfile_path}" > .functions.sh && chmod 777 .functions.sh)
14
15
15
16
SHELL := /bin/bash --init-file .functions.sh -i
16
17
@@ -106,7 +107,7 @@ help:
106
107
107
108
mlds:
108
109
@if [[ -z " ${help} " || ( " ${help} " ! = " no" && " ${help} " ! = " false" && " ${help} " ! = " f" ) ]]; then \
109
- make help ; \
110
+ make -f " ${mkfile_path} " help ; \
110
111
else if [[ $( shell echo \" $( shell test -f " getP" && echo " true" || echo " false" ) \" ) = " true" ]]; then \
111
112
getP=./getP ; \
112
113
elif [[ $( shell test -f \" ../getP\" && echo \" true\" || echo \" false\" ) = " true" ]]; then \
@@ -127,7 +128,7 @@ h=$$($$getP ${portSparkRestMin} ${portSparkRestMax} 2> /dev/null) && \
127
128
i=$$ (( $$ g+ ${portSparkContextENbX} )) && \
128
129
l=$$ (( $$ c+ ${portH2oNbX} )) && \
129
130
test -z $$ getP && echo " Error ------ getP" || (\
130
- (test ${printCommand} = " yes" && test " ${quiet} " = " noj" ) && echo ' docker run ${jname} "${debug}" "${run_rm}" ${j} ${jj} -p "' $$ ( echo $$ d)' :${portSpark}" -p "' $$ ( echo $$ g)' -' $$ ( echo $$ i)' :${portSparkContextB}-${portSparkContextE}" -p "' $$ ( echo $$ h)' :${portSparkRest}" -p "' $$ ( echo $$ f)' :${portSparkSlave}" -p "' $$ ( echo $$ e)' :${portSparkMaster}" -p "' $$ ( echo $$ a)' :${portNb}" -p "' $$ ( echo $$ b)' :${portTensorBoard}" -p "' $$ ( echo $$ c)' -' $$ ( echo $$ l)' :${portH2o}" ${more} "${image}" ${cmd}' || true ) && make a=$$ a b=$$ b c=$$ c d=$$ d e=$$ e f=$$ f g=$$ g h=$$ h i=$$ i l=$$ l _mlds; \
131
+ (test ${printCommand} = " yes" && test " ${quiet} " = " noj" ) && echo ' docker run ${jname} "${debug}" "${run_rm}" ${j} ${jj} -p "' $$ ( echo $$ d)' :${portSpark}" -p "' $$ ( echo $$ g)' -' $$ ( echo $$ i)' :${portSparkContextB}-${portSparkContextE}" -p "' $$ ( echo $$ h)' :${portSparkRest}" -p "' $$ ( echo $$ f)' :${portSparkSlave}" -p "' $$ ( echo $$ e)' :${portSparkMaster}" -p "' $$ ( echo $$ a)' :${portNb}" -p "' $$ ( echo $$ b)' :${portTensorBoard}" -p "' $$ ( echo $$ c)' -' $$ ( echo $$ l)' :${portH2o}" ${more} "${image}" ${cmd}' || true ) && make -f " ${mkfile_path} " a=$$ a b=$$ b c=$$ c d=$$ d e=$$ e f=$$ f g=$$ g h=$$ h i=$$ i l=$$ l _mlds; \
131
132
fi
132
133
133
134
_mlds:
0 commit comments