In a makefile I have the need to generate a
multi-line C-macro (for use in Glib):

g_trace.h: Makefile
  $(file > $@,$(trace_h))

define trace_h
  #define G_TRACE(level, fmt, ...)                  $\\
          do {                                      $\\
            if (_g_trace_level() >= level) {        $\\
               _g_trace_color (TRACE_COLOUR_START); $\\
  # ....

Without the '$\\' syntax, I get everything on one line
which I'd rather not want. With the '$\\' endings, g_trace.h
is perfect.

But with 'MAKEFLAGS += --warn-undefined-variables', I get a
bunch of warnings:
  'reference to undefined variable '\''

How can I avoid that?
I read upon '.WARNINGS', but fail to see how to use that in this case.


Reply via email to