yochju / latex-makefile

Automatically exported from code.google.com/p/latex-makefile
Other
0 stars 0 forks source link

_check_programs failure #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make _check_programs

What is the expected output? What do you see instead?

I expect it to check if I have all the programs it needs. I get:

$ make _check_programs
== Checking Makefile Dependencies ==

/bin/sh: Bad substitution
make: *** [_check_programs] Error 2
$

What version of the product are you using? On what operating system?

Ubuntu 8.04 64 bits.
latex-makefile-2.1.21

Running   make  SHELL_DEBUG=1 _check_programs  I get:

$ make  SHELL_DEBUG=1 _check_programs
+ tput setaf 0
+ tput setaf 1
+ tput setaf 2
+ tput setaf 3
+ tput setaf 4
+ tput setaf 5
+ tput setaf 6
+ tput setaf 7
+ tput bold
+ tput smul
+ tput sgr0
+ echo == Checking Makefile Dependencies ==
== Checking Makefile Dependencies ==
+ echo

+ [ -f Makefile ]
+ sed -e /^[[:space:]]*#[[:space:]]*EXTERNAL PROGRAMS:/,/^$/!d -e /EXTERNAL
PROGRAMS/d -e /^$/d -e /^[[:space:]]*#/i\  -e
s/^[[:space:]]*#[[:space:]][^=]*// Makefile
+ sed -e s/^[[:space:]]*// -e /^#/d -e s/[[:space:]]*#.*// -e
/^=/s/[[:space:]]/_/g -e /^[[:space:]]*$/d -e
s/^[^=].*=[[:space:]]*\([^[:space:]]\{1,\}\).*$/\1/
+ allprogs==_ESSENTIAL_PROGRAMS_=
==_Basic_Shell_Utilities_==
cat
cp
ls
diff
echo
egrep
env
mv
sed
sort
touch
uniq
which
xargs
==_LaTeX_(tetex-provided)_==
bibtex
dvips
latex
makeindex
kpsewhich
ps2pdf
ps2pdf13
=_OPTIONAL_PROGRAMS_=
==_Makefile_Color_Output_==
tput
==_TeX_Generation_==
rst2latex.py
==_EPS_Generation_==
dot
fig2dev
gnuplot
gunzip
==_Beamer_Enlarged_Output_==
psnup
==_Viewing_Stuff_==
gv
xpdf
display
+ formatfield=               
/bin/sh: Bad substitution
make: *** [_check_programs] Error 2
$

Original issue reported on code.google.com by eorli...@gmail.com on 23 Oct 2008 at 3:23

GoogleCodeExporter commented 9 years ago
This looks like another problem stemming from Ubuntu's switch to make /bin/sh =>
/bin/dash.  Could you do me a favor and set SHELL=bash just to see what happens?

Meanwhile, I'll look at the substitutions that are being made.  It looks like 
it's
failing in one of the ${} substitutions.

In fact, if I were a betting man, I'd be blaming ${p:0:1} inside the for loop.  
Just
tried that on dash, and sure enough, it hates it.  That's unfortunate.  It will
probably also barf on the ${formatfield:0:$${#formatfield}-${#p}} as well.  
Sigh.

I'm not sure how else to make this happen in dash, and I'm having a hard time 
finding
documentation detailing precisely what is supported.  Any pointers you have 
would be
helpful.

Original comment by shiblon on 23 Oct 2008 at 3:52

GoogleCodeExporter commented 9 years ago
Please verify that r44 works for you.  It has been patched to use standard case
statements to detect lines that start with =, and now uses sed to make the 
spacing
look good instead of the bash-specific string slicing operators.

Original comment by shiblon on 23 Oct 2008 at 4:31

GoogleCodeExporter commented 9 years ago
Changing status to fixed, awaiting verification.

Original comment by shiblon on 23 Oct 2008 at 4:31

GoogleCodeExporter commented 9 years ago
This works:

$ make SHELL=bash _check_programs

r44 works too.

I can't understand why Ubuntu insists on using dash. Oh well. Thanks for the 
quick
response, you can consider this fix verified.

Original comment by eorli...@gmail.com on 23 Oct 2008 at 4:39

GoogleCodeExporter commented 9 years ago
Marking as verified.  Thanks for the bug report!

Original comment by shiblon on 23 Oct 2008 at 4:44