v01d opened a new issue #398:
URL: https://github.com/apache/incubator-nuttx-apps/issues/398


   I'm opening this issue since I tried to address some problem where an app 
was not being cleaned due to the current approach of detecting placeholder 
files not working (since it requires the placeholders to be present along the 
complete path to the app for it to work) in #397 but the problem requires a 
better solution.
   
   To sum up, we can:
   * recurse every subdirectory in `apps/`: slow and wasteful, not really 
necessary (brute force approach)
   * recurse to directories containing placeholder files (such as .depend, 
etc.): this is prone to problems and as I mentioned fails in some cases
   * go directly into each app directory from top-level Makefile: does not work 
since we need to for example clean generated Kconfig files in intermediate 
directories leading to an app dir
   * **preferred** use CONFIGURED_APPS to build the list of all intermediate 
subdirectories we need to traverse
   
   I'm trying the last approach but I couldn't get it fully to work. The first 
change is to have this in Make.defs:
   ```
   CONFIGURED_SUBDIRS = $(sort $(foreach APP, $(CONFIGURED_APPS), 
$(CURDIR)$(DELIM)$(firstword $(subst /, ,$(subst $(CURDIR),,$(APP))))$(DELIM)))
   ```
   This will take for example apps/examples/hello, apps/builtin, 
apps/wireless/bluetooth/btsak and, when standing on apps/ it will return 
examples, builtin, wireless. This works for the first level, but once you get 
into the second level, you should only consider apps for that subdirectory and 
this is where I'm not sure how to handle (eg: inside examples, do not consider 
the other apps to build the list of subdirectories).


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to