[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

generated files issues

From: Werner LEMBERG
Subject: generated files issues
Date: Wed, 25 Sep 2013 00:00:20 +0200 (CEST)


I have two templates, `foo.cin' and `foo.hin', which are used to
create the files `foo.c' and `foo.h', respectively.  File `foo.h'
get's included in another header file, `bar.h', which in turn is
included by almost every other file of library `foobar' (including

Currently, I have this in my

  libfoobar_la_SOURCES = \
     bar.h \
     ... \
     foo.c \
     foo.h \

  foo.h: foo.hin
         do-something < foo.hin > foo.h
  foo.c: foo.cin
         do-something < foo.cin > foo.c

Unfortunately, this doesn't work.  While calling `make', I get

    GEN foo.c
    CC  foo.lo
  In file included from foo.c:
  bar.h: fatal error: foo.h: No such file or directory
  compilation terminated.
  make[2]: *** [foo.lo] Error 1

What's the recommended solution to such a problem, except adding
dependencies for all .c files which directly or indirectly include
`foo.h' (which is both inconvenient and error prone)?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]