From owner-freebsd-ports@FreeBSD.ORG Wed Nov 21 14:30:09 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE61616A417 for ; Wed, 21 Nov 2007 14:30:09 +0000 (UTC) (envelope-from rsc@admadic.de) Received: from mo-p00-ob.rzone.de (mo-p00-ob.rzone.de [81.169.146.162]) by mx1.freebsd.org (Postfix) with ESMTP id 42C4913C465 for ; Wed, 21 Nov 2007 14:30:09 +0000 (UTC) (envelope-from rsc@admadic.de) X-RZG-CLASS-ID: mo00 X-RZG-AUTH: lUESeo99iNzPSoaxNYLEYM0vFQKTxznPOmIi0KhUTW8YiUQ81L7u+QLQl0Q= Received: from srv.lpz.q-17.de.local (dslb-088-074-152-211.pools.arcor-ip.net [88.74.152.211]) by post.webmailer.de (mrclete mo58) (RZmta 14.3) with ESMTP id p04db2jALCh9ZU for ; Wed, 21 Nov 2007 15:30:07 +0100 (MET) (envelope-from: ) Received: (qmail 2484 invoked by uid 98); 21 Nov 2007 14:08:33 -0000 Received: from 192.168.40.21 by srv.lpz.q-17.de.local (envelope-from , uid 89) with qmail-scanner-2.01 ( Clear:RC:1(192.168.40.21):. Processed in 0.034057 secs); 21 Nov 2007 14:08:33 -0000 Received: from unknown (HELO ?192.168.40.21?) (192.168.40.21) by srvfb.lpz.q-17.de.local with SMTP; 21 Nov 2007 14:08:32 -0000 Message-ID: <47443BE1.2080308@admadic.de> Date: Wed, 21 Nov 2007 15:08:33 +0100 From: Rainer Schwarze User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Newbie: problem using SUB_LIST in Makefile X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 14:30:09 -0000 Hi, I'd like to adjust a port and need to change SUB_LIST and a ./files/pkg-install.in script. I adjusted the SUB_LIST variable but the variable-replacements are not done to the appropriate files. I'll present parts of my files and ask a few questions at the end of my email. (BTW: I'm working on the port mail/qmail-scanner, my system runs on 6.2-RELEASE) This is a part of the Makefile: --8<---Makefile----- ... XWFLG=test SUB_FILES= pkg-install pkg-message SUB_LIST+= QS_USER=${QS_USER} \ QS_ID=${QS_ID} \ SPOOLDIR=${SPOOLDIR} \ XWRAPPER=${XWFLG} .include .if defined(WITH_CWRAPPER) SUB_LIST+= CWRAPPER=yes .else SUB_LIST+= CWRAPPER=no .endif ... --8<---Makefile----- My ./files/pkg-install.in looks like that: --8<---./files/pkg-install.in--- #!/bin/sh PW="/usr/sbin/pw" CHOWN="/usr/sbin/chown" CHMOD="/bin/chmod" MKDIR="/bin/mkdir -p" NOLOGIN="/usr/sbin/nologin" QS_USER=%%QS_USER%% QS_ID=%%QS_ID%% SPOOLDIR=%%SPOOLDIR%% CWRAPPER=%%CWRAPPER%% XWRAPPER=%%XWRAPPER%% ... --8<---./files/pkg-install.in--- When I run make, the resulting ./work/pkg-install looks like that: --8<---./work/pkg-install--- #!/bin/sh PW="/usr/sbin/pw" CHOWN="/usr/sbin/chown" CHMOD="/bin/chmod" MKDIR="/bin/mkdir -p" NOLOGIN="/usr/sbin/nologin" QS_USER=qscand QS_ID=98 SPOOLDIR=/var/spool/qscand CWRAPPER=%%CWRAPPER%% XWRAPPER=%%XWRAPPER%% ... --8<---./work/pkg-install--- So most of the SUB_LIST entries worked, only my ?WRAPPER entries did not. Looks a bit like I am missing a very basic detail here... Questions: 1) What could be the reason that even XWRAPPER is not handled when the replacement is performed? 2) Is my approach of adding entries to SUB_LIST based on WITH_.../WITHOUT_... correct? (Or is that impossible after including bsd.port.pre.mk? As far as I understand, the WITH_.../WITHOUT_... are available only after bsd.port.[*.]mk is included...?) Thanks and best wishes, Rainer --