Skip to contentSkip to conversation

tools: don't use = after "define" in Rules.mk

PATCH In review Jan Beulich 2 participants 3 messages Sep 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: don't use = after "define" in Rules.mk

The assignment operator is optional, and use of it breaks with make 3.81.

Fixes ded08cdfa72b ("tools: generate most contents of library make variables")
tools/Rules.mk +1 -1
@@ -94,7 +94,7 @@ INSTALL_DIR_ROOT = [ $$UID -ne 0 ] || $(
 # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or
 # $(SHLIB_libfoo)
 
-define LIB_defs =
+define LIB_defs
  XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
  CFLAGS_libxen$(1) = -I$$(XEN_libxen$(1))/include $$(CFLAGS_xeninclude)
  SHDEPS_libxen$(1) = $$(foreach use,$$(USELIBS_$(1)),$$(SHLIB_libxen$$(use)))
#1 lore raw
Quoted 10 lines · Jan Beulich

The assignment operator is optional, and use of it breaks with make 3.81.

Fixes ded08cdfa72b ("tools: generate most contents of library make variables")

tools/Rules.mk INSTALL_DIR_ROOT = [ $$UID -ne 0 ] || $( · line 100

Quoted 8 lines
tools/Rules.mk +1 -1
@@ -94,7 +94,7 @@ INSTALL_DIR_ROOT = [ $$UID -ne 0 ] || $(
  # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or
  # $(SHLIB_libfoo)
 
-define LIB_defs =
+define LIB_defs
   XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
   CFLAGS_libxen$(1) = -I$$(XEN_libxen$(1))/include $$(CFLAGS_xeninclude)
   SHDEPS_libxen$(1) = $$(foreach use,$$(USELIBS_$(1)),$$(SHLIB_libxen$$(use)))

I'd suggest to fix stubdom/Makefile, too (that was introduced with commit ddb2934a914df). I have a patch doing both fixes lying here. Do you want me to send it instead, or fix it yourself?

Juergen

#2 lore raw
Quoted 13 lines · Jürgen Groß
Quoted 12 lines · Jan Beulich

The assignment operator is optional, and use of it breaks with make 3.81.

Fixes ded08cdfa72b ("tools: generate most contents of library make variables")
tools/Rules.mk +0 -0
@@ -94,7 +94,7 @@ INSTALL_DIR_ROOT = [ $$UID -ne 0 ] || $(
  # Consumers of libfoo should not directly use $(SHDEPS_libfoo) or
  # $(SHLIB_libfoo)
 
Quoted 10 lines

tools/Rules.mk INSTALL_DIR_ROOT = [ $$UID -ne 0 ] || $( · line 100

Quoted 6 lines
tools/Rules.mk +1 -1
-define LIB_defs =
+define LIB_defs
   XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
   CFLAGS_libxen$(1) = -I$$(XEN_libxen$(1))/include $$(CFLAGS_xeninclude)
   SHDEPS_libxen$(1) = $$(foreach use,$$(USELIBS_$(1)),$$(SHLIB_libxen$$(use)))

I'd suggest to fix stubdom/Makefile, too (that was introduced with commit ddb2934a914df). I have a patch doing both fixes lying here. Do you want me to send it instead, or fix it yourself?

Please do, since you say you have it ready.

Jan