My default shell is bash in Ubuntu 14.04. I have a csh script file named clean.sh with the following make command:
#! /bin/csh -f
make -f commande.make del
And commande.make has
CKHOME=../CHEMKIN/DATA_BASES
LIN_DATA=${CKHOME}/LIN_FILES/
LINK_CKTP=${CKHOME}/LINK_CKTP_FILES/
#-----------------------------------------------------
include schema_cinetique.make
LINKFILE=${NAME}_LINK
LINKTPFILE=${NAME}_LINKTP
LINKFILE_OLD=${NAME_OLD}_LINK
LINKFILE_NEW=${NAME_NEW}_LINK
#-----------------------------------------------------
cplink :
${COPY} ${LINK_CKTP}${LINKFILE} LINK
cplink2 :
${COPY} ${LINK_CKTP}${LINKFILE} LINKZ1
tplink :
${COPY} ${LINK_CKTP}${LINKTPFILE} LINKTPZ1
calcul :
${COPY} jobtimp1 LJOBNZ1
${COPY} unsteadyf.dat1 DATZ1
del :
${DELETE} LINKZ1 LINKTPZ1 LJOBNZ1 DATZ1 SOLASUZ1
I opened the terminal and moved to the location and tried
./clean.sh
or
csh clean.sh &
or
csh -f clean.sh
Nothing worked.
I got the following line in the terminal,
LINKZ1 LINKTPZ1 LJOBNZ1 DATZ1 SOLASUZ1
make: LINKZ1: Command not found
make: *** [del] Error 127
So, how to run clean.sh file ?
Nothing workedmean? Can you post the error message?commande.make. But your file is namedcommand.make.bash clean.sh. You may want to delete/update the initial #! line, if you want. Alternatively, you can also invokemakedirectly from the command line (why do you use a script, if all what it does is just callingmake???) However, I have rather the feeling that something is wrong with the Makefile itself, so this is is unrelated to which shell happens to be used to invoke make. Unfortunately, your posting is incomplete in this respect, so I can't help here much. It seems that the make variableDELETEis empty.exportis not really necessary if you specify it on the same command line as themakecommand. That sets the variable only for the duration of the command's execution. The answer actually tries to explain this; maybe read up on whatexportdoes if you need a more detailed explanation.