diff --git a/make/any.mk b/make/any.mk new file mode 100644 index 00000000..b4ba6db1 --- /dev/null +++ b/make/any.mk @@ -0,0 +1,13 @@ +include $(ONL)/make/config.mk +ifndef TOOLCHAIN +$(error $$TOOLCHAIN must be specified.) +else +export TOOLCHAIN +endif + +ifndef ARCH +$(error $$ARCH must be specified.) +else +export ARCH +endif + diff --git a/packages/base/any/faultd/builds/Makefile b/packages/base/any/faultd/builds/Makefile index 1e58f391..4f07a942 100644 --- a/packages/base/any/faultd/builds/Makefile +++ b/packages/base/any/faultd/builds/Makefile @@ -19,13 +19,7 @@ # # ############################################################ -include $(ONL)/make/config.mk - -ifndef TOOLCHAIN -$(error $$TOOLCHAIN must be specified.) -else -export TOOLCHAIN -endif +include $(ONL)/make/any.mk MODULE := faultd-module include $(BUILDER)/standardinit.mk diff --git a/packages/base/any/onlp/builds/onlp-platform-defaults/Makefile b/packages/base/any/onlp/builds/onlp-platform-defaults/Makefile index bcbfc1b4..de582335 100644 --- a/packages/base/any/onlp/builds/onlp-platform-defaults/Makefile +++ b/packages/base/any/onlp/builds/onlp-platform-defaults/Makefile @@ -29,13 +29,7 @@ # # ############################################################ -include $(ONL)/make/config.mk - -ifndef TOOLCHAIN -$(error $$TOOLCHAIN must be specified.) -else -export TOOLCHAIN -endif +include $(ONL)/make/any.mk MODULE := libonlp-platform-defaults-module include $(BUILDER)/standardinit.mk diff --git a/packages/base/any/onlp/builds/onlp-platform/Makefile b/packages/base/any/onlp/builds/onlp-platform/Makefile index 81f09fcb..70029019 100644 --- a/packages/base/any/onlp/builds/onlp-platform/Makefile +++ b/packages/base/any/onlp/builds/onlp-platform/Makefile @@ -22,13 +22,7 @@ # # ############################################################ -include $(ONL)/make/config.mk - -ifndef TOOLCHAIN -$(error $$TOOLCHAIN must be specified.) -else -export TOOLCHAIN -endif +include $(ONL)/make/any.mk MODULE := libonlp-platform-module include $(BUILDER)/standardinit.mk diff --git a/packages/base/any/onlp/builds/onlp/Makefile b/packages/base/any/onlp/builds/onlp/Makefile index d18020ec..f2918840 100644 --- a/packages/base/any/onlp/builds/onlp/Makefile +++ b/packages/base/any/onlp/builds/onlp/Makefile @@ -22,13 +22,7 @@ # # ############################################################ -include $(ONL)/make/config.mk - -ifndef TOOLCHAIN -$(error $$TOOLCHAIN must be specified.) -else -export TOOLCHAIN -endif +include $(ONL)/make/any.mk MODULE := libonlp-module include $(BUILDER)/standardinit.mk diff --git a/packages/base/any/onlp/builds/onlpd/Makefile b/packages/base/any/onlp/builds/onlpd/Makefile index f8e9e684..0a3a9d49 100644 --- a/packages/base/any/onlp/builds/onlpd/Makefile +++ b/packages/base/any/onlp/builds/onlpd/Makefile @@ -22,13 +22,7 @@ # # ############################################################ -include $(ONL)/make/config.mk - -ifndef TOOLCHAIN -$(error $$TOOLCHAIN must be specified.) -else -export TOOLCHAIN -endif +include $(ONL)/make/any.mk MODULE := onlpd-module include $(BUILDER)/standardinit.mk