Commit Graph

13 Commits

Author SHA1 Message Date
simbit18
8b0bc64903 tools/link.sh: fix an incorrect variable
fix ${desg} ->  ${dest}
2024-01-08 19:46:59 -03:00
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
Alin Jerpelea
7ff60d7c5b tools: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-18 11:26:21 -08:00
Xiang Xiao
3b9efc95a2 Format all shell scripts in tools folder
Change-Id: Ieef2eb93d56c03972b4dc63a1c55aabf1fb0d169
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-06 00:51:49 +08:00
Manuel Stühn
5585cc421c Merged in manuelstuehn/nuttx/feature/bsd-portable (pull request #975)
change all occurences of /bin/(ba)sh to /usr/bin/env bash which appears more portable

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 15:57:26 +00:00
Gregory Nutt
715a2779d4 fix a typo in the previous commit. 2018-06-29 08:55:32 -06:00
Gregory Nutt
31ea6ec910 Update tools/link.sh per suggestions by Mark so that it can be used with MSYS vs copydir.sh. 2018-06-29 07:08:51 -06:00
Gregory Nutt
6fd018089c Check link target - do nothing if link is already created and the target matches the request. From Freddie Chopin. 2014-11-11 07:00:18 -06:00
patacongo
8b768dc6fa Separate CVS parsing logic from tools/mksyscall.c; Create tools/mksymtab.c to create symbol tables from CSV files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5075 42af7a65-404d-4744-a932-0658087f49c3
2012-09-01 15:33:33 +00:00
patacongo
aae7fd5432 Explicitly use /bin/bash vs /bin/sh for Ubuntu compatibility
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@722 42af7a65-404d-4744-a932-0658087f49c3
2008-03-04 00:40:49 +00:00
patacongo
0156bc785f Turn off script debug
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@533 42af7a65-404d-4744-a932-0658087f49c3
2008-01-09 00:07:03 +00:00
patacongo
32c3e79ece Need to handle paths with spaces in them
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@532 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 23:55:02 +00:00
patacongo
3f1c7dc771 Add logic for environments that can't use soft links
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@530 42af7a65-404d-4744-a932-0658087f49c3
2008-01-08 22:11:00 +00:00