Every command for a Makefile target is run in a shell. However, every line is run in its own shell.
Code:
tstp=`awk '{print $$3,$$2,$$6}' date1`
Is legal but useless since the assignment to tstp only remains in effect for that line. Note that you need 2 $'s otherwise Make substitutes its own variables.
psaulm4's suggestion of using the $shell() function is probably a better idea, but you
could also do this:
Code:
distro:
cp -r LMTO-A LMTO-B lmto/ ASR/ makefile Doc extras
tstp=`date | awk '{print $$3,$$2,$$6}'` ;\
make -f extras/makefile clean ;\
mkdir extras/LMTO-ASR-DISTRO ;\
cp -r extras/LMTO-A extras/LMTO-B extras/lmto/ extras/ASR/ extras/makefile extras/Doc extras/LMTO-ASR-DISTRO ;\
tar -zcf extras/lmto-asr-$${tstp}.tar.gz extras/LMTO-ASR-DISTRO ;\
rm -rf extras/LMTO-ASR-DISTRO
The backslashes escape the newlines so all the commands are on a single line and therefore in the same shell.