From 0688647f2f69d1bee1ecc76338190e6a12209da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 26 Aug 2015 09:53:25 +0200 Subject: Add dependency to .conf.mk on .target in Makefile If .target file is changed (=target changed), makefile configuration should been regenerated. --- Makefile | 5 ++++- conf.py | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d1bba9a..54c4236 100644 --- a/Makefile +++ b/Makefile @@ -99,9 +99,12 @@ distclean_buildroot: ####################################### -.conf.mk: conf.py +.conf.mk: conf.py .target scripts/confmk.py +.target: + $(error Please select target by writing it to .target file) + parse_kconfig: @if [ `$(MAKE) -C scripts/parse_kconfig/ -q; echo $$?` != "0" ]; then \ $(MAKE) -C scripts/parse_kconfig/; fi diff --git a/conf.py b/conf.py index b8204cb..eb8e7ac 100644 --- a/conf.py +++ b/conf.py @@ -1,4 +1,5 @@ import os +import sys import re import importlib.machinery @@ -126,6 +127,8 @@ if os.path.isfile(os.path.join(absroot, '.target')): if not re.match('__*__', name): vars()[name] = vars(ovconf)[name] else: - print("W: No target specifier. Write target to .target file.") + print("E: Invalid target specifier. Write valid target to .target file.") + sys.exit(-99) else: - print("W: No target specifier. Write target to .target file.") + print("E: No target specifier. Write target to .target file.") + sys.exit(-99) -- cgit v1.2.3