AlanRosenthal opened a new pull request #5069:
URL: https://github.com/apache/incubator-nuttx/pull/5069


   ## Summary
   This PR updates the dependencies for `dirlinks` so they're all real files. 
This allows `dirlinks` rule to not have to be rerun every time.
   
   Changes:
   * tools/link.sh
     * link.sh now detects broken simlinks. Previously, it would return `0` if 
the simlink existed, but didn't point to anything.
   
   * tools/Makefile.unix
     * Added dependencies to simlinks as order-only prerequisites. See 
https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
     * Removed `touch` from simlink recipes by specifying them as order only 
prerequisites.
     * Check Kconfig variables before adding directories as simlinks
     * Added rule for `$(TOPDIR)/arch/dummy/Kconfig`
     * Added rule for `$(ARCH_SRC)/board/board`
     * Removed `.clean_context` dependency from various simlinks. It doesn't 
make any sense why creating a simlink should require clearing the context, 
especially when `context` is dependent on `dirlinks`
     * Added pattern rule (similar to `CONTEXTDIRS_DEPS`) for external folder 
dirlink dependencies
     * Use $(APPDIR) instead of $(CONFIG_APPS_DIR), since on line 64 $(APPDIR) 
is validated and `realpath` is called on the path
   
   * .gitignore
     * Added ignore rule for external folder dirlink dependencies
   
   ## Impact
   setting up the simlinks is a one time job, we shouldn't have to do it 
multiple times.
   
   ## Testing
   Step 1: configure nuttx:
   ```
   $ (cd tools && ./configure.sh -a ../incubator-nuttx-apps 
stm32f3discovery:nsh)
   ```
   part of the configure step ends up calling `dirlinks`.
   
   Step 2: We can confirm that `dirlinks` doesn't need to be run again by 
running with the question flag: `--question`
   ```
   $ make dirlinks --question
   $ echo $?
   0
   ```
   
   Step 3: confirm `make` succeeds.
   ```
   make
   ```
   


-- 
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-unsubscr...@nuttx.apache.org

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


Reply via email to