Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 99 18:01:00 EST
From:      "Ryan,  Martin" <MRyan@VICMAIN.YPA.telstra.com.au>
To:        "'FreeBSD Questions'" <freebsd-questions@freebsd.org>
Subject:   Help with {P}make
Message-ID:  <36CD1C9B@ypmail.nds.telecom.com.au>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36CD1C9B>