Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LTLIBRARIES: mv *.Tpo *.Plo, but the former doesn't exist and the latter already does

I'm doing a pretty straight-forward conversion of an existing library (libtcod) to Autotools (for OS X happiness). Unfortunately, when I switch my Makefile.am's lib_LIBRARIES rule to lib_LTLIBRARIES, the build goes from successful to un. Excerpt from the output below:

Making all in .
make[1]: Nothing to be done for `all-am'.
Making all in src
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -MT bresenham_c.lo -MD -MP -MF .deps/bresenham_c.Tpo -c -o bresenham_c.lo bresenham_c.c
mv -f .deps/bresenham_c.Tpo .deps/bresenham_c.Plo
mv: rename .deps/bresenham_c.Tpo to .deps/bresenham_c.Plo: No such file or directory
make[1]: *** [bresenham_c.lo] Error 1
make: *** [all-recursive] Error 1

src/Makefile.am looks like this:

lib_LTLIBRARIES = libtcod.la
libtcod_la_SOURCES = bresenham_c.c bresenham3_c.c bsp_c.c color_c.c ...

src/.deps contains:

$ ls src/.deps/
bresenham_c.Plo bresenham_c.Po ...

Am I making an obvious mistake here, or should this work?

like image 816
Adam Blinkinsop Avatar asked Jul 27 '09 22:07

Adam Blinkinsop


1 Answers

Yes, I'm making an obvious mistake. I needed to run autoreconf -i to create a non-empty ltmain.sh script; the existing one made ../libtool here a no-op.

like image 156
Adam Blinkinsop Avatar answered Nov 12 '22 20:11

Adam Blinkinsop