From owner-freebsd-questions Thu Feb 18 23:13:30 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.telstra.com.au (mail.telstra.com.au [192.148.160.16]) by hub.freebsd.org (Postfix) with ESMTP id 86D971165B for ; Thu, 18 Feb 1999 23:13:12 -0800 (PST) (envelope-from MRyan@VICMAIN.YPA.telstra.com.au) Received: (from uucp@localhost) by mail.telstra.com.au (8.8.2/8.6.9) id SAA02662 for ; Fri, 19 Feb 1999 18:12:55 +1100 (EST) Received: from mail-gw.fwall.telstra.com.au(192.148.147.16) via SMTP by mail.telstra.com.au, id smtpd002535; Fri Feb 19 18:12:16 1999 Received: (from uucp@localhost) by mail-gw.fwall.telstra.com.au (8.8.2/8.6.9) id SAA21861 for ; Fri, 19 Feb 1999 18:12:12 +1100 (EST) Received: from cdn-mail.dn.itg.telecom.com.au(144.135.109.134) via SMTP by mail-gw.fwall.telstra.com.au, id smtpd021768; Fri Feb 19 18:11:51 1999 Received: from ypmail.nds.telecom.com.au (ypmail.nds.telecom.com.au [172.136.8.3]) by cdn-mail.dn.itg.telecom.com.au (8.8.2/8.6.9) with SMTP id SAA21620 for ; Fri, 19 Feb 1999 18:11:50 +1100 (EST) Received: by ypmail.nds.telecom.com.au with Microsoft Mail id <36CD1C9B@ypmail.nds.telecom.com.au>; Fri, 19 Feb 99 18:11:07 EST From: "Ryan, Martin" To: "'FreeBSD Questions'" Subject: Help with {P}make Date: Fri, 19 Feb 99 18:01:00 EST Message-ID: <36CD1C9B@ypmail.nds.telecom.com.au> X-Mailer: Microsoft Mail V3.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello all, I'm trying to put our web pages and scripts under CVS control. All the relevant scripts and pages for a particular part of the web site constitute a project that is checked out into a development directory. A make file then puts updated copies in relevant directories under an apache data directory running on a separate port for testing. A 'make install' puts update copies under the real web directory structure. To do this, I'm trying to use the make local variable ".PREFIX" to write a dependency line like; TESTDIR = /home/www-hotstage/cgi-bin INSTALLDIR = /home/www/cgi-bin PLSCRIPTS = sites.pl sites-popup.pl test : $(TESTDIR)/$(PLSCRIPTS) install : $(INSTALLDIR)/$(PLSCRIPTS) $(TESTDIR)/$(PLSCRIPTS) : $(.PREFIX).pl perl -c $(.PREFIX).pl cp $(.PREFIX).pl $(.TARGET) Questions ========= When I do a 'make -n -d m' I get; Graph cycles through /home/www-hotstage/cgi-bin/sites.pl Graph cycles through sites-popup.pl `test' not remade because of errors. 1) What on earth is this supposed to tell me? If I switch on all debugging I get pages of stuff including; SuffFindDeps (/home/www-hotstage/cgi-bin/sites.pl) No known suffix on /home/www-hotstage/cgi-bin/sites.pl. Using .NULL suffix not adding suffix rules /home/www-hotstage/cgi-bin/sites.pl:@ = /home/www-hotstage/cgi-bin/sites.pl /home/www-hotstage/cgi-bin/sites.pl:* = /home/www-hotstage/cgi-bin/sites.pl Expanding "$(.PREFIX).pl".../home/www-hotstage/cgi-bin/sites.pl.pl... ...showing that the .PREFIX is expanding to /home/www-hotstage/cgi-bin/sites.pl Note: If I add ".SUFFIXES : .pl", then .PREFIX expands to /home/www-hotstage/cgi-bin/sites Q2) Why isn't this acting as the Pmake tutorial and the man page (quote following) say? " .PREFIX The file prefix of the file, containing only the file portion, no suffix or preceding directory components; also known as `*'." Q3) What level of debugging gives me enough information to see whats going on without the reams of stuff you get with -d A? Q4) Is there a better way to do this using make? Q5) Is there a better way to do this using something else? Any help would be much appreciated, Martin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message