[sed] command failure? Porting a project to FreeBSD
blubee blubeeme
gurenchan at gmail.com
Wed Jun 7 06:10:32 UTC 2017
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 "/^<!--/s/\.xml ::/.$$format --/" \
-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 "/^<!--/s/\.xml ::/.$format --/" \
-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
More information about the freebsd-current
mailing list