[Top][All Lists]

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

Warnings on '$\\'

From: Gisle Vanem
Subject: Warnings on '$\\'
Date: Fri, 14 Apr 2023 11:38:03 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

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

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