accessible/interfaces/ia2/Makefile.in
author Manuel Rego Casasnovas <rego@igalia.com>
Mon, 19 Nov 2018 18:46:13 +0000
changeset 506778 359ee839f1a358175a0d4d537476d32a7f4a39a4
parent 458952 c4b14a5665b439ab07b9b796bb18912870c8fdff
permissions -rw-r--r--
Bug 1507805 [wpt PR 14092] - [css-grid] Some fixes on grid-container-scrollbar-* tests, a=testonly Automatic update from web-platform-tests[css-grid] Some fixes on grid-container-scrollbar-* tests * Use Ahem font to avoid weird small pixel differences on iOS. * Fix some typos reported by @fred-wang at https://bugs.webkit.org/show_bug.cgi?id=191656#c14 -- Merge pull request #14092 from mrego/grid-container-scrollbars [css-grid] Some fixes on grid-container-scrollbar-* tests -- wpt-commits: ef7824a8ff88c95d36b31b377fe252f7c56d2da0, 1b543a1083f48c13b25f23a5f23d14f6ade958d4 wpt-pr: 14092

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

IA2DIR        = $(topsrcdir)/other-licenses/ia2

GARBAGE       += $(MIDL_GENERATED_FILES) \
                 $(MIDL_UNUSED_GENERATED_FILES) \
                 midl_done \
                 typelib_done \
                 $(NULL)

# Please keep this list in sync with the moz.build file until the rest of this
# Makefile is ported over.
MIDL_INTERFACES = \
  Accessible2.idl \
  Accessible2_2.idl \
  Accessible2_3.idl \
  AccessibleAction.idl \
  AccessibleApplication.idl \
  AccessibleComponent.idl \
  AccessibleDocument.idl \
  AccessibleEditableText.idl \
  AccessibleHyperlink.idl \
  AccessibleHypertext.idl \
  AccessibleHypertext2.idl \
  AccessibleImage.idl \
  AccessibleRelation.idl \
  AccessibleTable.idl \
  AccessibleTable2.idl \
  AccessibleTableCell.idl \
  AccessibleText.idl \
  AccessibleText2.idl \
  AccessibleValue.idl \
  $(NULL)

# Please keep this list in sync with the moz.build file until the rest of this
# Makefile is ported over.
MIDL_ENUMS = \
  AccessibleEventId.idl \
  AccessibleRole.idl \
  AccessibleStates.idl \
  IA2CommonTypes.idl \
  $(NULL)

MIDL_LIBRARIES = \
  IA2Typelib.idl \
  $(NULL)

MIDL_GENERATED_FILES = \
  dlldata.c \
  $(MIDL_ENUMS:%.idl=%.h) \
  $(MIDL_INTERFACES:%.idl=%_p.c) \
  $(MIDL_INTERFACES:%.idl=%_i.c) \
  $(MIDL_INTERFACES:%.idl=%.h) \
  $(MIDL_LIBRARIES:%.idl=%.tlb) \
  $(NULL)

# We want to generate a .tlb from MIDL_LIBRARIES, but midl also generates
# a bunch of .h and .c files that we're not interested in.
MIDL_UNUSED_GENERATED_FILES = \
  $(MIDL_LIBRARIES:%.idl=%_p.c) \
  $(MIDL_LIBRARIES:%.idl=%_i.c) \
  $(MIDL_LIBRARIES:%.idl=%.h) \
  $(MIDL_LIBRARIES:%.idl=%.c) \
  $(NULL)

EMBED_MANIFEST_AT = 2

INSTALL_TARGETS += midl
midl_FILES := $(filter %.h %_i.c,$(MIDL_GENERATED_FILES))
midl_DEST = $(DIST)/include
midl_TARGET := midl

export:: midl

include $(topsrcdir)/config/rules.mk

# generate list of to-be-generated files that are missing
# but ignore special file dlldata.c and .tlb files
missing:=$(strip $(foreach onefile,$(strip $(patsubst %.tlb,,$(subst dlldata.c,,$(MIDL_GENERATED_FILES)))),$(if $(wildcard $(onefile)),,$(onefile))))

missing_base:=$(sort $(basename $(subst _p.c,,$(subst _i.c,,$(missing)))))

# Bug 1420119: We need the trailing semicolon here to generate a recipe for the
# midl targets to avoid timestamp caching issues.
$(MIDL_GENERATED_FILES) : midl_done typelib_done ;

ifneq ("$(missing)","")
midl_done : FORCE
endif

midl_done : $(addprefix $(IA2DIR)/,$(MIDL_INTERFACES) $(MIDL_ENUMS))
	for idl in $(sort $(subst FORCE,,$?) $(addsuffix .idl,$(addprefix $(IA2DIR)/,$(missing_base)))); do \
	  $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -Oicf $$idl; \
	done
	touch $@

# The intent of this rule is to generate the .tlb file that is referenced in the
# .rc file for IA2Marshal.dll
typelib_done : $(addprefix $(srcdir)/,$(MIDL_LIBRARIES))
	for idl in $?; do \
	  $(MIDL) $(MIDL_FLAGS) -app_config -I $(IA2DIR) -D _MIDL_DECLARE_WIREM_HANDLE -dlldata `basename $$idl .idl`.c -Oicf $$idl; \
	done
	touch $@

# This marshall dll is NOT registered in the installer (agreed to by IA2 participants)
register::
	regsvr32 -s $(DIST)/bin/$(SHARED_LIBRARY)