nuttx/.gitignore
Alan Rosenthal 2366795786 Improve dependencies for dirlinks.
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.
This PR also changes the name from `dirlinks` to `.dirlinks`, since a file named `.dirlinks` is created to denote that all symlinks have been created

Changes:
* tools/link.sh
  * link.sh now detects broken symlinks. Previously, it would return `0` if the symlink existed, but didn't point to anything.

* tools/Makefile.unix
  * Added dependencies to symlinks as order-only prerequisites. See https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
  * Removed `touch` from symlink recipes by specifying them as order only prerequisites.
  * Check Kconfig variables before adding directories as symlinks
  * Added rule for `$(TOPDIR)/arch/dummy/Kconfig`
  * Added rule for `$(ARCH_SRC)/board/board`
  * 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
  * Added a rule `clean_dirlinks` to cleanup the symlinks in the correct order

* .gitignore
  * Added ignore rule for `.dirlinks`

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
```
2022-01-03 17:12:18 +01:00

54 lines
493 B
Plaintext

*.a
*.adb
*.asm
*.bin
*.d
!*.d/
*.dSYM
*.elf
*.exe
*.gcno
*.gcda
*.hex
*.i
*.ihx
*.lib
*.lod
*.lst
*.map
*.o
*.obj
*.rel
*.src
*.srec
*.swp
*.sym
*.wsp
*.ddc
*~
.depend
/.config
/.config.old
/.cproject
/.gdbinit
/.project
/.version
/_SAVED_APPS_config
/cscope.*
/defconfig
/Make.defs
/nuttx
/nuttx-*
/nuttx.*
/staging
/tags
/TAGS
core
Make*.dep
uImage
/external
# $(TOPDIR)/Makefile.[unix|win]::$(CONTEXTDIRS_DEPS)
.context
# $(TOPDIR)/Makefile.[unix|win]::$(DIRLINKS_EXTERNAL_DIRS)
.dirlinks