On Thu, 4 Feb 1999, Mark Riehl wrote:

> Guys,
> ...
> 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

I'm not an expert, but try this:

 .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

and, better, delete all ";  \" pairs at the end of the lines.

-----------------------------------------------------------------------
                     Jos� Augusto Vasconcellos Neto
-----------------------------------------------------------------------
    fone/fax (+55) (19) 287-5528  |  javn AT nutecnet PT com PT br
-----------------------------------------------------------------------
              Stop software piracy -- use free software!
-----------------------------------------------------------------------
                         Powered by GNU/Linux
-----------------------------------------------------------------------

Reply via email to