From owner-freebsd-current@freebsd.org Wed Jun 7 06:10:32 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61CA5BFC3AB for ; Wed, 7 Jun 2017 06:10:32 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-pf0-x235.google.com (mail-pf0-x235.google.com [IPv6:2607:f8b0:400e:c00::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D75A2ED1 for ; Wed, 7 Jun 2017 06:10:32 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-pf0-x235.google.com with SMTP id 9so1914908pfj.1 for ; Tue, 06 Jun 2017 23:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=jJycZd2ShdRxrehpwVo/Ej56qcM1uXfmWOpl+I1T+vw=; b=NMJI+qLBjWA2GjNZCB9Ji63VTGJhtkwhNHbrB2+dJdnpr0Lt0vCBSIv66eUH4u+q/s GGpR1qsGBGcqmtYLEIpMngyCAMbjyo946I4n4IZF1xmdpzmiQ0sjeRW0E87iUxcqMVAM MgfryRoghqlQc08Cyz+AsGSx4rMhWKE3Ldxn7ODH7a7KFQfGixzcrHCn3UEmxM8ULfgr YvneOeuvAeR0LssUGBKYpr3y8puvEk1ex5Mc9MaehXvalx48NjLYWjGM9RluoG3RJ8A/ bfP60bQdIJZMe6Yq+Zlcsyn+pLEQBmjsZxNw1uyzdksyrug8k9TlCDxzFlTNe29ZyJD8 KSZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=jJycZd2ShdRxrehpwVo/Ej56qcM1uXfmWOpl+I1T+vw=; b=mDc4vThkFZnTAo5p9fO9Twg7oxeTIKxwbpdW01XM800LWxo5dQxv/hkfuyM02uBiws J6p6RUobkPhhYeezVDWj/rWgHysBgNUOHNjlGBUIhq4hXNWQXCilfsevuCXEv6jDqshb 2Q3gYuFTLqwtMjrgdr4HCPF6AeIRE58MKqxvoxKViW2Uhd5DJSCscVaCPo/3IZwzGwAf VFFpFO+5UrxGr5/FNUk1gHi923eIp3r0Gr2o5edYFUPQtxTt2Pw0UtH9ppUfCIorXAHw RNnvxJ3lb1lEjsc6LKfqwy8csABy7qr6NlDHqLOtDs7nxptdPg9xz6nRrbIAEi8Wr/20 ZYag== X-Gm-Message-State: AODbwcBoqWX8hiOn3GALMm9huPedafM05IA+mg3ekn09I1Bv3c+jyjIj x/OA5cvnU+zJIgpMdAk5oyrum8sfR5Cc X-Received: by 10.84.217.90 with SMTP id e26mr14648523plj.161.1496815831467; Tue, 06 Jun 2017 23:10:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.162.5 with HTTP; Tue, 6 Jun 2017 23:10:31 -0700 (PDT) From: blubee blubeeme Date: Wed, 7 Jun 2017 14:10:31 +0800 Message-ID: Subject: [sed] command failure? Porting a project to FreeBSD To: FreeBSD current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 06:10:32 -0000 Hello I am trying to bring these updated print drivers to FreeBSD: https://github.com/utsushi/utsushi.git There's the automake scripts in there that's sorta helpful but I seem to have gotten stuck with something. I made sure that my environmental variables are set LDFLAGS -L/usr/local/lib CPPFLAGS -I/usr/local/include i run autoreconf -fmi that does it's thing and everything goes smoothly ./configure also seems to run just fine when I run make there's a problem; sed command just hangs, it's been there for hours now and no change. the line in the makefile looks like this: $(srcdir)/utsushi/tag.hpp $(srcdir)/lib/tag.cpp: $(srcdir)/lib/tag.xml \ $(srcdir)/lib/tag.xsl format=`echo $@ | sed 's|.*\.\([^.]*\)$$|\1|'`; \ sed -n \ -e "/^/{ /-->/d; s|^$$|//|p; s|^....|//|p; }' $< > $@; \ xsltproc --stringparam format $$format $(srcdir)/lib/tag.xsl $< >> $@ sed -i 's/SEC_N_("%1%")/"%1%"/' $@ I am not the best with sed but I feel like there might be some issues; I am running tcsh shell, it could be it or that command is malformed. Trying to run the same make file with gmake, I get this output. format=`echo lib/tag.cpp | sed 's|.*\.\([^.]*\)$|\1|'`; \ sed -n \ -e "/^/{ /-->/d; s|^$|//|p; s|^....|//|p; }' lib/tag.xml > lib/tag.cpp; \ xsltproc --stringparam format $format ./lib/tag.xsl lib/tag.xml >> lib/tag.cpp sed -i 's/SEC_N_("%1%")/"%1%"/' lib/tag.cpp sed: 1: "lib/tag.cpp": extra characters at the end of l command gmake: *** [Makefile:1042: lib/tag.cpp] Error 1 extra character at the end of | command. It's a bit unclear to me. There's a tags.xml and tags.xsl in the ./lib/ directory so it seems to be a sed issue. Any assistance would be appreciated. Best, Owen