Guys,
I'm trying to build a target that will tar up everything in my current
directory. I'm using GNU make 3.76.1 under Linux (Slackware 3.6, kernel
2.0.35). I get the same result on a Solaris x86 machine using the
same version of make.
Here's my target:
.PHONY: backup
backup: *.C *.h *.pl Makefile \
@file=`date +%y-%m-%d.%H.%M`.tgz ; \
echo Making backup $$file ; \
tar -cvzf ./$$file $^; \
rm -f current.tgz ; \
ln -s $$file current.tgz
When I run this, I get the following error:
sarnoff:~/iote/current 90> make backup
make: *** No rule to make target `file=`date', needed by `backup'.
Stop.
Does anyone see what I'm doing wrong?
Thanks,
Mark