On 2014-03-21 18:27, Omair Majid wrote:
* Andrew Hughes <gnu.and...@redhat.com> [2014-03-21 13:25]:
Why the huge duplication in make/lib/Awt2dLibraries.gmk?
I couldn't find a way to make an argument conditional (the
'INCLUDE_FILES := LCMS.c,' bit) inside the $(call ...) block.

The typical way to solve that is to assign to a variable, e.g.

ifeq ($(USE_EXTERNAL_LCMS), true)
  # If we're using an external library, we'll just need the wrapper part.
  # By including it explicitely, all other files will be excluded.
  BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
else
  BUILD_LIBLCMS_INCLUDE_FILES :=
endif

and then using
    INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
inside the build declaration.

/Magnus

Reply via email to