shiblon / latex-makefile

A Makefile for LaTeX - drop it in, type make, and magic happens.
Other
185 stars 30 forks source link

Cannot handle long filenames as input #123

Closed shiblon closed 8 years ago

shiblon commented 8 years ago

Originally reported on Google Code with ID 110

Hi,

Seems like the makefile can't handle long filenames. I includ an epslatex graphics
in my source file as following :

\input{./results/specfp_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ctr.tex}

and the error I get is 
make: *** No rule to make target `results/specfp_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ctr\',
needed by `ooo_fifo_main.d'.

make: Failed to remake makefile `ooo_fifo_main.d'.
make: *** No rule to make target `results/specfp_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ctr
.pdf', needed by `ooo_fifo_main.pdf'.

I have verified this by shortening the filename. Also by running pdflatex directly
in the shell it works fine.

thanx.

Reported by abhishek.deb2k on 2011-01-21 17:52:34

shiblon commented 8 years ago
Following is how the log file looks like
.SECONDEXPANSION:
-include ./results/specfp_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ctr\\\
.pdf.gpi.d
ooo_fifo_main.d: $$(call graphics-source,./results/specfp_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ctr\\\
.pdf)
ooo_fifo_main.pdf ooo_fifo_main._graphics: $$(call graphics-target,./results/specfp_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ctr\\\
.pdf)
-include ./results/specint_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ct\\\
r.pdf.gpi.d
ooo_fifo_main.d: $$(call graphics-source,./results/specint_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ct\\\
r.pdf)
ooo_fifo_main.pdf ooo_fifo_main._graphics: $$(call graphics-target,./results/specint_smt_disp_iss_prof_fifo_4_uops_ready_disp_issued_less_ct\\\
r.pdf)

Reported by abhishek.deb2k on 2011-01-21 18:09:12

shiblon commented 8 years ago
Quick note: the makefile doesn't fully support subdirectories, and it's looking like
it never will.  This will probably work most of the time, but things like "make clean"
will not work properly with graphics in subdirectories.

That said, this appears to be a real bug and I'm looking at it right now.  If you could
give me more details, like attaching your log files, that might help me find it.

Reported by shiblon on 2011-01-22 05:45:16

shiblon commented 8 years ago
I believe that this can be fixed with a one-line patch.  If you are building the makefile
from the source, then the attached patch will do it for you (I think).  If you are
just using the downloaded makefile, look for the line that says

-e '  s/.*File `\([^'"'"']*\)'"'"' not found.*/\1/' \        

And add the following directly below it (the backslash needs to be the last thing on
the line):

-e '  s/[[:cntrl:]]//' \

IF that doesn't fix it, then we have another one lurking somewhere, but it definitely
fixed the error for me.

Reported by shiblon on 2011-01-22 05:59:09

shiblon commented 8 years ago
Actually attaching patch.  Also, this is submitted, and is available as rb199832dda5e.

Reported by shiblon on 2011-01-22 06:05:59


shiblon commented 8 years ago
Ok I have just moved to 2.2.0-rc8 and the problem seems to have resolved. Even without
the one line patch. Earlier I was using 2.2.0-rc6.

Thanx for a quick reply.

Reported by abhishek.deb2k on 2011-01-22 12:43:00

shiblon commented 8 years ago
Hey, that's great.  There was still a bug, though, so I'm glad you submitted the issue
report.

Reported by shiblon on 2011-01-22 17:15:19

shiblon commented 8 years ago
so is the one line patch needed anymore? 

thanx for your makefile it certainly is convenient to automate things.

Reported by abhishek.deb2k on 2011-01-22 18:31:54

shiblon commented 8 years ago
The one-line patch is now part of the main distribution: 2.2.0-rc9

Enjoy!

And you're welcome.  :-)

Reported by shiblon on 2011-01-22 19:11:18