Subject: make variables .IMPSRC and .TARGET not used
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/24/2003 19:42:01
This is in regards to pkg/20843.

pkgsrc/security/libcrack/patch-ab patches a Makefile to use:

 ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} ${.IMPSRC} -c -o ${.TARGET}

The buildlink logs says:

/usr/bin/libtool --mode=compile gcc -O2
-I/tmp/pkgsrc/security/libcrack/work.tahoma/.buildlink/include
-I../cracklib -DIN_CRACKLIB -c -o

As you can see there is no source file and no object file listed.

This does work:
  ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c -o $@ $<

I think these local variables are not in GNU make. And for some reason
aren't working with the bmake.

This is with bmake from othersrc/bootstrap-pkgsrc of last week. And I also
tried with GNU make 3.80. This is under a Linux.

I could not reproduce under NetBSD.

I don't see these mentioned in the appropriate chapter in the GNU make
HTML manual.

Also, this worked too:

${LIBTOOL} --mode=link ${CC} -o ${@:.a=.la} ${OBJS:.o=.lo} -rpath
${PREFIX}/lib -version-info 2:7

(I got rid of the .TARGET.)

Any comments before I add my patch-ab fix to the pkg/20843?

   Jeremy C. Reed
   http://bsd.reedmedia.net/

p.s. the second part of the PR is to provide the dist/words file.