From owner-freebsd-ports@FreeBSD.ORG Sat Mar 7 16:10:51 2009 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 EF28D106564A for ; Sat, 7 Mar 2009 16:10:51 +0000 (UTC) (envelope-from gesbbb@yahoo.com) Received: from smtp102.prem.mail.ac4.yahoo.com (smtp102.prem.mail.ac4.yahoo.com [76.13.13.41]) by mx1.freebsd.org (Postfix) with SMTP id 9E9298FC0C for ; Sat, 7 Mar 2009 16:10:51 +0000 (UTC) (envelope-from gesbbb@yahoo.com) Received: (qmail 85689 invoked from network); 7 Mar 2009 16:10:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Date:From:To:Subject:Message-ID:Reply-To:Organization:X-Mailer:Face:X-Face:Mime-Version:Content-Type; b=2+BzGZcCCX4s2j1A+HAVBQj301+wnh3q4HY800O5DDBcd52CP+rJsy/QKjssFhOxWxErdLp9rNOmsmKtfm3ST3XMJC3iJUgw5FPP6T3vDqavzMUjC3QsQUHlSWgjEcl9InWFaMUlwojv+6g/csE6hM0RPIi6gg73VhTiZlcZOXw= ; Received: from unknown (HELO scorpio) (gesbbb@76.23.177.172 with login) by smtp102.prem.mail.ac4.yahoo.com with SMTP; 7 Mar 2009 16:10:50 -0000 X-YMail-OSG: olz7Cc8VM1lbrS5BvHjGSZlzeqTAEC.n5yAjQ8v6lEzVTlhXogY3sTLai6er5EPumqBoKTRT_1UJQs3KYrI7LGPawvweSD3vtlOIfyMZOE27mw9rLo1zrS9Q8LWRNl.byrevfm2v1ga85uG9gixmC59pONq4PYRP4.7kwm8V6as_ei56Eye.s8TycgVHWtOUnd69qeDUN73VlapSZqEG9tLUtFTa X-Yahoo-Newman-Property: ymail-3 Date: Sat, 7 Mar 2009 11:10:40 -0500 From: Jerry To: freebsd-ports@freebsd.org Message-ID: <20090307111040.2a00be66@scorpio> Organization: seibercom.net X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-portbld-freebsd6.3) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(gxJxxcR nSNPNr*/^~StawWU9KDJ-CT0k$f#@t2^K&BS_f|?ZV/.7Q Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/3rm=av2_ietufz0nMxNXvym"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Using sed in a Makefile X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-ports@freebsd.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Mar 2009 16:10:52 -0000 --Sig_/3rm=av2_ietufz0nMxNXvym Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I have a question regarding the syntax for 'sed' in a Makefile. Using sed o= utside a Makefile this works fine. sed -e 's|SIG_DB=3D${SIG_DB:-""}|SIG_DB=3D${SIG_DB:-"/var/db/clamav"}|' ./a= .sh sed -e 's|CONFIG_FILE=3D${CONFIG_FILE:-/etc/${SCRIPT_NAME}.conf}|CONFIG_FIL= E=3D${CONFIG_FILE:-/usr/local/etc/${SCRIPT_NAME}.conf}|' ./a.sh However, This does not work in a Makefile @${REINPLACE_CMD} -e 's|SIG_DB=3D${SIG_DB:-""}|SIG_DB=3D${SIG_DB:-"/var/db/= clamav"}|g' ${WRKSRC}/${PORTNAME}.sh @${REINPLACE_CMD} -e 's|CONFIG_FILE=3D${CONFIG_FILE:-/etc/${SCRIPT_NAME}.co= nf}|CONFIG_FILE=3D${CONFIG_FILE:-/usr/local/etc/${SCRIPT_NAME}.conf}|g' ${W= RKSRC}/${PORTNAME}.sh =09 Syntax error: Unterminated quoted string *** error code 2 This will probably line wrap making it difficult to read. I just do not und= erstand why it should behave differently. The second line in each example i= s the one that seems to cause a problem. --=20 Jerry gesbbb@yahoo.com When the ax entered the forest, the trees said, "The handle is one of us!" Turkish proverb --Sig_/3rm=av2_ietufz0nMxNXvym Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkmynIkACgkQBvaKIJWWCO08DwCfVouNyfVdJ+le7OOUHnW4Cem5 FhQAn1x8Fcwu4gxg1NTlBDXLPy6JN8fH =uo5r -----END PGP SIGNATURE----- --Sig_/3rm=av2_ietufz0nMxNXvym--