From owner-freebsd-hackers  Wed Mar 21 22:59:36 2001
Delivered-To: freebsd-hackers@freebsd.org
Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250])
	by hub.freebsd.org (Postfix) with SMTP id 7C05437B71B
	for <freebsd-hackers@freebsd.org>; Wed, 21 Mar 2001 22:59:33 -0800 (PST)
	(envelope-from josb@cncdsl.com)
Received: (qmail 64273 invoked by uid 1000); 22 Mar 2001 06:59:45 -0000
Date: Wed, 21 Mar 2001 22:59:23 -0800
From: Jos Backus <josb@cncdsl.com>
To: freebsd-hackers@freebsd.org
Subject: make .PREFIX question
Message-ID: <20010321225923.A64237@lizzy.bugworks.com>
Reply-To: Jos Backus <josb@cncdsl.com>
Mail-Followup-To: freebsd-hackers@freebsd.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Sender: owner-freebsd-hackers@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

    /tmp% cat Makefile

    .SUFFIXES: .txt
    foo/bar.txt: a b
	@echo ${.TARGET}, ${.OODATE}, ${.ALLSRC}, ${.PREFIX}

    a b:
	echo $*

    /tmp% mkdir foo
    /tmp% touch b; make

gives

    foo/bar.txt, b, a b, foo/bar

instead of

    foo/bar.txt, b, a b, bar

even though man make(1) says

      .PREFIX   The file prefix of the file, containing only the file
                portion, no suffix or preceding directory components;
                also known as `*'.

What am I missing?

Thanks,
-- 
Jos Backus                 _/  _/_/_/        "Modularity is not a hack."
                          _/  _/   _/                -- D. J. Bernstein
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb@cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message