Subject: how to use ${ID} in a Makefile?
To: Packages Technical List NetBSD Discussion <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 09/30/2006 14:45:50
I'm having trouble with using ${ID} in a Makefile on MacOS X.  
Consider the following sample Makefile:

cat Makefile.sample
DISTNAME=       sample
CATEGORIES=     none
.include "../../mk/bsd.prefs.mk"
ABC!=   ${ID} -n
.include "../../mk/bsd.pkg.mk"


which yields:

imac:~/pkgsrc/wip/tacacs-shrubbery schwarz$ ~/pkg/bin/bmake -f  
Makefile.sample
sh: line 1: -n: command not found
bmake: "/Users/schwarz/pkgsrc/wip/tacacs-shrubbery/Makefile.sample"  
line 4: warning: " -n" returned non-zero status


Why is ${ID} resolved to an empty string?

However, on the other hand I get:

~/pkg/bin/bmake -f Makefile.sample show-vars VARNAMES=ID
sh: line 1: -n: command not found
bmake: "/Users/schwarz/pkgsrc/wip/tacacs-shrubbery/Makefile.sample"  
line 4: warning: " -n" returned non-zero status
/usr/bin/id

Can anyone resolve this mystery?



-- 
Georg Schwarz    http://home.pages.de/~schwarz/
georg.schwarz@freenet.de  +49 178 8545053