You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/12/22 10:16:56 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #5055: Improve Makefile.[unix|win]::context's dependencies

gustavonihei commented on a change in pull request #5055:
URL: https://github.com/apache/incubator-nuttx/pull/5055#discussion_r773770342



##########
File path: tools/Makefile.unix
##########
@@ -336,11 +328,36 @@ dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(
 # the config.h and version.h header files in the include/nuttx directory and
 # the establishment of symbolic links to configured directories.
 
-context: include/nuttx/config.h include/nuttx/version.h include/math.h include/float.h include/stdarg.h include/setjmp.h dirlinks
-	$(Q) mkdir -p staging
-	$(Q) for dir in $(CONTEXTDIRS) ; do \
-		$(MAKE) -C $$dir context || exit; \
-	done
+# Generate a pattern to make Directories.mk context
+
+CONTEXTDIRS_DEPS = $(patsubst %,%/.context,$(CONTEXTDIRS))
+
+context: include/nuttx/config.h include/nuttx/version.h dirlinks $(CONTEXTDIRS_DEPS) | staging
+
+staging:
+	$(Q) mkdir -p $@
+
+# Pattern rule for $(CONTEXTDIRS_DEPS)
+
+%.context: include/nuttx/config.h dirlinks
+	$(MAKE) -C $(patsubst %.context,%,$@) TOPDIR="$(TOPDIR)" context

Review comment:
       ```suggestion
   	$(Q) $(MAKE) -C $(patsubst %.context,%,$@) TOPDIR="$(TOPDIR)" context
   ```
   Missing silent flag in `make` command.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org