-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug 757855: move xpidl* logic into a named makefile - batch #1
UltraBlame original commit: 30da794ae32ca71964099e32577ef8f370036ded
- Loading branch information
Showing
6 changed files
with
186 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# -*- makefile -*- | ||
# | ||
# 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/. | ||
|
||
ifdef VERBOSE | ||
$(warning loading test) | ||
endif | ||
|
||
USE_AUTOTARGETS_MK = 1 | ||
include $(topsrcdir)/config/makefiles/makeutils.mk | ||
|
||
basedir = blah | ||
DIST = $(basedir)/dist | ||
DI = $(DIST)/include | ||
IDL_DIR = $(basedir)/idl | ||
INSTALL := cp | ||
|
||
XPIDLSRCS = $(srcdir)/check-xpidl.mk | ||
|
||
include $(topsrcdir)/config/makefiles/xpidl.mk | ||
|
||
$(call requiredfunction,topsrcdir) | ||
$(call requiredfunction,XPIDL_GEN_DIR) | ||
|
||
HIDE=@ | ||
check-xpidl: xpidl-install-src xpidl-install-headers | ||
$(HIDE)test -d $(DIST) || exit 90 | ||
$(HIDE)test -f $(DI)/check-xpidl.mk || exit 91 | ||
$(HIDE)test -f $(IDL_DIR)/check-xpidl.mk || exit 92 | ||
|
||
# Declare targets to avoid including rules.mk | ||
$(DI) $(IDL_DIR): | ||
mkdir -p $@ | ||
|
||
clean-xpidl: | ||
$(RM) -r $(basedir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# -*- makefile -*- | ||
# vim:set ts=8 sw=8 sts=8 noet: | ||
# | ||
# 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/. | ||
# | ||
|
||
# Always declared, general use by: | ||
# js/xpconnect/tests/idl/Makefile.in:libs | ||
# toolkit/crashreporter/test/Makefile.in | ||
XPIDL_GEN_DIR ?= _xpidlgen | ||
GARBAGE_DIRS += $(XPIDL_GEN_DIR) | ||
|
||
|
||
########################################################################### | ||
## Conditional logic | ||
########################################################################### | ||
ifndef INCLUDED_XPIDL_MK #{ | ||
INCLUDED_XPIDL_MK = 1 | ||
|
||
ifneq (,$(XPIDLSRCS)) #{ | ||
|
||
ifndef NO_DIST_INSTALL #{ | ||
_xpidl-todo_ += xpidl-install-src | ||
_xpidl-todo_ += xpidl-install-headers | ||
endif #} | ||
|
||
endif #} XPIDLSRCS | ||
|
||
export:: $(_xpidl-todo_) | ||
|
||
$(call requiredfunction,mkdir_deps) | ||
endif #} INCLUDED_XPIDL_MK | ||
|
||
|
||
########################################################################### | ||
## processing targets | ||
########################################################################### | ||
ifdef _xpidl-todo_ #{ | ||
|
||
## Logic batch #1 | ||
xpidl-install-src-preqs=\ | ||
$(XPIDLSRCS) \ | ||
$(call mkdir_deps,$(IDL_DIR)) \ | ||
$(NULL) | ||
|
||
xpidl-install-src: $(xpidl-install-src-preqs) | ||
$(INSTALL) $(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))) | ||
|
||
xpidl-install-headers-preqs =\ | ||
$(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) \ | ||
$(call mkdir_deps,$(DIST)/include) \ | ||
$(NULL) | ||
xpidl-install-headers: $(xpidl-install-headers-preqs) | ||
$(INSTALL) $(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))) | ||
|
||
endif #} _xpidl-todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# -*- makefile -*- | ||
# vim:set ts=8 sw=8 sts=8 noet: | ||
# | ||
# 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/. | ||
# | ||
|
||
# Always declared, general use by: | ||
# js/xpconnect/tests/idl/Makefile.in:libs | ||
# toolkit/crashreporter/test/Makefile.in | ||
XPIDL_GEN_DIR ?= _xpidlgen | ||
GARBAGE_DIRS += $(XPIDL_GEN_DIR) | ||
|
||
|
||
########################################################################### | ||
## Conditional logic | ||
########################################################################### | ||
ifndef INCLUDED_XPIDL_MK #{ | ||
INCLUDED_XPIDL_MK = 1 | ||
|
||
ifneq (,$(XPIDLSRCS)) #{ | ||
|
||
ifndef NO_DIST_INSTALL #{ | ||
_xpidl-todo_ += xpidl-install-src | ||
_xpidl-todo_ += xpidl-install-headers | ||
endif #} | ||
|
||
endif #} XPIDLSRCS | ||
|
||
export:: $(_xpidl-todo_) | ||
|
||
$(call requiredfunction,mkdir_deps) | ||
endif #} INCLUDED_XPIDL_MK | ||
|
||
|
||
########################################################################### | ||
## processing targets | ||
########################################################################### | ||
ifdef _xpidl-todo_ #{ | ||
|
||
## Logic batch #1 | ||
xpidl-install-src-preqs=\ | ||
$(XPIDLSRCS) \ | ||
$(call mkdir_deps,$(IDL_DIR)) \ | ||
$(NULL) | ||
|
||
xpidl-install-src: $(xpidl-install-src-preqs) | ||
$(INSTALL) $(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))) | ||
|
||
xpidl-install-headers-preqs =\ | ||
$(patsubst %.idl,$(XPIDL_GEN_DIR)/%.h, $(XPIDLSRCS)) \ | ||
$(call mkdir_deps,$(DIST)/include) \ | ||
$(NULL) | ||
xpidl-install-headers: $(xpidl-install-headers-preqs) | ||
$(INSTALL) $(IFLAGS1) $(foreach val,$^,$(call mkdir_stem,$(val))) | ||
|
||
endif #} _xpidl-todo_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters