summaryrefslogtreecommitdiffstats
path: root/src/import/tools
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2015-08-03 06:53:11 -0500
committerPatrick Williams <iawillia@us.ibm.com>2015-12-11 15:30:28 -0600
commitbf3fd9d8fa3ae5f0e3573ed5c9d19e291244d3ac (patch)
treeb7bf8df9eda78dd067815f3891ebe7f9ea3ae8c8 /src/import/tools
parent72914b16bef6ef00fa09d5ab1efd653d0cab402a (diff)
downloadtalos-hostboot-bf3fd9d8fa3ae5f0e3573ed5c9d19e291244d3ac.tar.gz
talos-hostboot-bf3fd9d8fa3ae5f0e3573ed5c9d19e291244d3ac.zip
Infra: Build FAPI2.
Change-Id: Ia899f5a400ac9e0d3237a98795676efa104c20c8 Original-Change-Id: Id0a9f52204f388d66de41f41bcde78c956969c4f Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19554 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Diffstat (limited to 'src/import/tools')
-rw-r--r--src/import/tools/build/common.dir/script.rules.mk74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/import/tools/build/common.dir/script.rules.mk b/src/import/tools/build/common.dir/script.rules.mk
new file mode 100644
index 000000000..e7b915cef
--- /dev/null
+++ b/src/import/tools/build/common.dir/script.rules.mk
@@ -0,0 +1,74 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: tools/build/common.d/script.rules.mk $
+#
+# IBM CONFIDENTIAL
+#
+# EKB Project
+#
+# COPYRIGHT 2015
+# [+] International Business Machines Corp.
+#
+#
+# The source code for this program is not published or otherwise
+# divested of its trade secrets, irrespective of what has been
+# deposited with the U.S. Copyright Office.
+#
+# IBM_PROLOG_END_TAG
+
+# Makefile that defines how we build generated files, often from scripts that
+# process other content in the repository, such as XML files.
+
+# BUILD_GENERATED
+# This macro will automatically generate all the recipes for running a tool
+# that generates other files. Requires that the following variables are
+# defined prior to calling this macro:
+# * GENERATED=name - Give a name to this generator.
+# * COMMAND=tool - Name of the tool to run.
+# * SOURCES=file1 file2 - List of files as 'input' to the tool.
+# * TARGETS=file3 file4 - List of files that are created as 'output'.
+# * $(GENERATED)_RUN - A macro that identifies how to run this tool.
+# Special variables:
+# * $(GENERATED)_PATH - Optional path to put output into.
+# * $(GENERATED)_COMMAND_PATH - Path to tool, assumed to be the current
+# directory of the .mk file if not given.
+BUILD_GENERATED = $(eval $(call __BUILD_GENERATED))
+
+# Order of operations:
+# * Define _PATH and _COMMAND_PATH if they do not exist.
+# * Define a recipe for a $(GENERATED).built timestamp file.
+# - Depend on $(COMMAND) and $(SOURCES)
+# - Ensure $(GENERATED)_PATH output path exists.
+# - Call $(GENERATED)_RUN macro.
+# - Touch timestamp file.
+# * Add dependency from TARGETS to .built timestamp file.
+# * Add timestamp and TARGETS to 'clean' target.
+# * Add timestamp to GEN_TARGETS.
+# * Clear out GENERATED, COMMAND, SOURCES, and TARGETS variables.
+define __BUILD_GENERATED
+$(GENERATED)_PATH ?= $$(GENPATH)
+$(GENERATED)_COMMAND_PATH ?= $(dir $(lastword $(MAKEFILE_LIST)))
+
+$$($(GENERATED)_PATH)/.$(GENERATED).built : \
+ $$($(GENERATED)_COMMAND_PATH)$(COMMAND) $(SOURCES)
+ $(C2) " GEN $(GENERATED)"
+ $(C1) mkdir -p $$($(GENERATED)_PATH)
+ $(call $(GENERATED)_RUN)
+ @touch $$@
+
+$$(addprefix $$($(GENERATED)_PATH)/,$(TARGETS)): \
+ $$($(GENERATED)_PATH)/.$(GENERATED).built
+
+$(call __CLEAN_TARGET,$$($(GENERATED)_PATH)/.$(GENERATED).built)
+$(foreach target,$(TARGETS),\
+ $(call __CLEAN_TARGET,$$($(GENERATED)_PATH)/$(target)))
+
+GEN_TARGETS += $$($(GENERATED)_PATH)/.$(GENERATED).built
+
+GENERATED:=
+COMMAND:=
+SOURCES:=
+TARGETS:=
+endef
+
OpenPOWER on IntegriCloud