mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
53fdfa68b9
All of the tools listed on the original documentation are now given their own individual doc pages. This makes it much easier to cross-reference them from other documentation locations (as many are used in CI/for specific architectures) and it also makes it easier for users to digest the information. Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
43 lines
1.7 KiB
ReStructuredText
43 lines
1.7 KiB
ReStructuredText
.. _build_system_linking:
|
|
|
|
============================================================
|
|
``link.[sh|bat]``, ``copydir.[sh|bat]``, ``unlink.[sh|bat]``
|
|
============================================================
|
|
|
|
Different file systems have different capabilities for symbolic links.
|
|
Some Windows file systems have no native support for symbolic links.
|
|
Cygwin running under Windows has special links built in that work with
|
|
all cygwin tools. However, they do not work when Windows native tools
|
|
are used with cygwin. In that case something different must be done.
|
|
|
|
If you are building under Linux or under cygwin with a cygwin tool
|
|
chain, then your Make.defs file may have definitions like the
|
|
following::
|
|
|
|
DIRLINK = $(TOPDIR)/tools/link.sh
|
|
DIRUNLINK = (TOPDIR)/tools/unlink.sh
|
|
|
|
The first definition is not always present because link.sh is the
|
|
default. link.sh is a bash script that performs a normal, Linux-style
|
|
symbolic link; unlink.sh is a do-it-all unlinking script.
|
|
|
|
But if you are building under cygwin using a Windows native toolchain
|
|
within a POSIX framework (such as Cygwin), then you will need something
|
|
like the following in you Make.defs file::
|
|
|
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
|
DIRUNLINK = (TOPDIR)/tools/unlink.sh
|
|
|
|
copydir.sh will copy the whole directory instead of linking it.
|
|
|
|
Finally, if you are running in a pure native Windows environment with
|
|
a CMD.exe shell, then you will need something like this::
|
|
|
|
DIRLINK = $(TOPDIR)/tools/copydir.bat
|
|
DIRUNLINK = (TOPDIR)/tools/unlink.bat
|
|
|
|
Note that this will copy directories. link.bat might also be used in
|
|
this case. link.bat will attempt to create a symbolic link using the
|
|
NTFS mklink.exe command instead of copying files. That logic, however,
|
|
has not been verified as of this writing.
|