NetBSD-Help archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bsd make and .IMPSRC - incomplete documentation?

Hi. May be I missed something important but the following Makefile
doesn't work as it is documented. 

man make says

             .IMPSRC The name/path of the source from which the target
                       is to be transformed (the ``implied'' source);
                       also known as `<'.

.IMPSRC is expanded to the empty string. What's wrong?

~> cat Makefile 
file.ext : file.src
        cp ${.IMPSRC} ${.TARGET}
~> touch file.src
~> make file.ext  
cp  file.ext
usage: cp [-R [-H | -L | -P]] [-f | -i] [-pv] src target
       cp [-R [-H | -L | -P]] [-f | -i] [-pv] src1 ... srcN directory
*** Error code 1

make: stopped in /home/cheusov

Best regards, Aleksey Cheusov.

Home | Main Index | Thread Index | Old Index