Subject: PLIST_SUBST guru wanted
To: None <tech-pkg@netbsd.org>
From: Bernd Ernesti <netbsd@arresum.inka.de>
List: tech-pkg
Date: 03/24/2002 16:19:32
Hi,

i have the following lines in a new package Makefile:

EZM3_SUBDIR?=   ezm3
EZM3_BASEDIR=   ${PREFIX}/${EZM3_SUBDIR}

PLIST_SUBST+=   EZM3_SUBST=${EZM3_BASEDIR:S/${PREFIX}\///}

And this in my PLIST file:

[..]
${EZM3_SUBST}/man/man1/m3bundle.1
[..]
@unexec ${RMDIR} %D/${EZM3_SUBST}/man/man1 2>/dev/null || true
@unexec ${RMDIR} %D/${EZM3_SUBST}/man 2>/dev/null || true
@unexec ${RMDIR} %D/${EZM3_SUBST}/lib 2>/dev/null || true
@unexec ${RMDIR} %D/${EZM3_SUBST}/bin 2>/dev/null || true
@unexec ${RMDIR} %D/${EZM3_SUBST}/ 2>/dev/null || true

Now, doing a make plist creates a .PLIST file, but neither the
m3bundle.1 nor the line with the rmdir of man/man1 are in the
created .PLIST.

There is too much magic in PLIST_SUBST so I have no idea what cause
this problem.

Bernd