From 97ce03737b24c2cb1a8b683ea9fef00a67bf4f46 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 11 Aug 2015 17:35:00 -0600 Subject: [PATCH] Top-level Makefiles: Add an application pre-configuration target --- Makefile.unix | 18 ++++++++++++------ Makefile.win | 14 ++++++++++---- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Makefile.unix b/Makefile.unix index 3e6442bb56..7d02fed717 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -1,7 +1,7 @@ ############################################################################ # Makefile.unix # -# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014-2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -473,19 +473,19 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) # location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See # README.txt file in the NuttX tools GIT repository for additional information. -config: +config: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf Kconfig -oldconfig: +oldconfig: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig -menuconfig: +menuconfig: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig -qconfig: +qconfig: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-qconf Kconfig -gconfig: +gconfig: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-gconf Kconfig # export @@ -556,11 +556,17 @@ endif # as a convenience, the following targets are included to support housekeeping # functions in the user application directory from the NuttX build directory. # +# apps_preconfig: Prepare applications to be configured # apps_clean: Perform the clean operation only in the user application # directory # apps_distclean: Perform the distclean operation only in the user application # directory. +apps_preconfig: +ifneq ($(APPDIR),) + $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" preconfig +endif + apps_clean: ifneq ($(APPDIR),) $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean diff --git a/Makefile.win b/Makefile.win index 1ff9ceefc1..4db50470a9 100644 --- a/Makefile.win +++ b/Makefile.win @@ -1,7 +1,7 @@ ############################################################################ # Makefile.win # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -476,13 +476,13 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT) # location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See # misc\tools\README.txt for additional information. -config: +config: apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf Kconfig -oldconfig: +oldconfig: apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig -menuconfig: configenv +menuconfig: configenv apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-mconf Kconfig # export @@ -545,11 +545,17 @@ endif # as a convenience, the following targets are included to support housekeeping # functions in the user application directory from the NuttX build directory. # +# apps_preconfig: Prepare applications to be configured # apps_clean: Perform the clean operation only in the user application # directory # apps_distclean: Perform the distclean operation only in the user application # directory. +apps_preconfig: +ifneq ($(APPDIR),) + $(Q) $(MAKE) -C "$(APPDIR)" TOPDIR="$(TOPDIR)" preconfig +endif + apps_clean: ifneq ($(APPDIR),) $(Q) $(MAKE) -C "$(APPDIR)" TOPDIR="$(TOPDIR)" clean