On Sat, Jul 30, 2005 at 03:26:43PM +0200, Thomas Degris wrote: > lib_LTLIBRARIES = libtoto.la > > dist_libtoto_la_SOURCES = src/toto.stc > libtoto_la_SOURCES =src/toto01.cxx src/toto02.cxx src/toto.cpp > > %.cxx: src/diary.xml > > src/diary.xml: src/toto.stc > gencxx src/toto.stc > > The problem with this approach is that make returns the error : > *** No rule to make target 'src/toto01.cxx', needed by > 'libtoto_la-toto01.lo'. Stop. > So, I guess the pattern %.cxx is not correct but I tried different > things and I can't make it work. Any ideas ?
You need some actual dependencies. Add something like this: $(cxx_files): src/diary.xml Pattern rules that don't have any actions are generally of limited use, partly because make tends to ignore them. Also, this makefile can get stuck. If src/diary.xml is up to date WRT src/toto.stc but the cxx files are not, for whatever reason (like somebody mangling the tree by hand), then make has nothing to do but the cxx files won't get built. So it breaks. One way to write this better is like this: src/diary.xml $(cxx_files): cxx_stamp cxx_stamp: src/toto.stc gencxx src/toto.stc touch cxx_stamp CLEANFILES += cxx_stamp I think that'll do what you want. -- .''`. ** Debian GNU/Linux ** | Andrew Suffield : :' : http://www.debian.org/ | `. `' | `- -><- |
signature.asc
Description: Digital signature