tools/mkwindeps.sh. A script that coordinates the use of cnvwindeps.exe
This commit is contained in:
parent
7f041b2af4
commit
c5bcfc166d
@ -11295,4 +11295,6 @@
|
||||
* tools/cnvwindeps.c: Add a tool that will convert paths in
|
||||
dependencies generated by a Windows compiler so that they can be
|
||||
used with the Cygwin make (2016-01-09).
|
||||
* tools/mkwindeps.sh: A script that coordinates us ov cnvwindeps.exe
|
||||
(2016-01-09).
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1d164c4df5b6577c52f88d56ce270bd4f7556963
|
||||
Subproject commit e3d982b2f1c179747551a015d5a4c11132dbfe47
|
@ -269,7 +269,12 @@ include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig$(HOSTEXEEXT)
|
||||
# Targets used to create dependencies
|
||||
|
||||
tools/mkdeps$(HOSTEXEEXT):
|
||||
$(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkdeps$(HOSTEXEEXT)
|
||||
$(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkdeps$(HOSTEXEEXT)
|
||||
|
||||
tools/cnvwindeps$(HOSTEXEEXT):
|
||||
ifeq ($(CONFIG_WINDOWS_CYGWIN),y)
|
||||
$(Q) $(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" cnvwindeps$(HOSTEXEEXT)
|
||||
endif
|
||||
|
||||
# dirlinks, and helpers
|
||||
#
|
||||
@ -460,12 +465,12 @@ download: $(BIN)
|
||||
# pass1dep: Create pass1 build dependencies
|
||||
# pass2dep: Create pass2 build dependencies
|
||||
|
||||
pass1dep: context tools/mkdeps$(HOSTEXEEXT)
|
||||
pass1dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT)
|
||||
$(Q) for dir in $(USERDEPDIRS) ; do \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
|
||||
done
|
||||
|
||||
pass2dep: context tools/mkdeps$(HOSTEXEEXT)
|
||||
pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT)
|
||||
$(Q) for dir in $(KERNDEPDIRS) ; do \
|
||||
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" EXTRADEFINES=$(KDEFINE) depend; \
|
||||
done
|
||||
|
2
arch
2
arch
@ -1 +1 @@
|
||||
Subproject commit 4570fe271a034ae7aa23e579064f90c75594f985
|
||||
Subproject commit 95a83af6d1ee3d2ecd2cd6a3c3bb4a99c4c06d7a
|
2
configs
2
configs
@ -1 +1 @@
|
||||
Subproject commit da294ce5cc305030e4f9bb8bd238054f20317525
|
||||
Subproject commit 7b507f0c3c812869cb4ec5981b740ac94444b49f
|
@ -165,8 +165,12 @@ endif
|
||||
# cnvwindeps - Convert dependences generated by a Windows native toolchain
|
||||
# for use in a Cygwin/POSIX build environment
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_CYGWIN),y)
|
||||
cnvwindeps$(HOSTEXEEXT): cnvwindeps.c
|
||||
$(Q) $(HOSTCC) $(HOSTCFLAGS) -o cnvwindeps$(HOSTEXEEXT) cnvwindeps.c
|
||||
else
|
||||
cnvwindeps$(HOSTEXEEXT):
|
||||
endif
|
||||
|
||||
ifdef HOSTEXEEXT
|
||||
cnvwindeps: cnvwindeps$(HOSTEXEEXT)
|
||||
|
69
tools/mkwindeps.sh
Normal file
69
tools/mkwindeps.sh
Normal file
@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
# tools/mkwindeps.sh
|
||||
#
|
||||
# Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# set -x
|
||||
|
||||
# Make sure that we know where we are
|
||||
|
||||
TOOLDIR=$(dirname $0)
|
||||
|
||||
if [ ! -x ${TOOLDIR}/mkwindeps.sh ]; then
|
||||
echo "ERROR: tools/ directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure that executables are ready
|
||||
|
||||
MKDEPS=${TOOLDIR}/mkdeps.exe
|
||||
CNVWINDEPS=${TOOLDIR}/cnvwindeps.exe
|
||||
|
||||
if [ ! -x ${MKDEPS} ]; then
|
||||
echo "ERROR: tools/mkdeps.exe does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -x ${CNVWINDEPS} ]; then
|
||||
echo "ERROR: tools/cnvwindeps.exe does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the mkdeps.exe program to generate a Windows dependency file
|
||||
|
||||
TMPFILE=$(mktemp)
|
||||
${MKDEPS} $* > ${TMPFILE} || { echo "mkdeps.exe failed"; exit 1; }
|
||||
|
||||
# Then convert this to a POSIX dependency file (on stdout)
|
||||
|
||||
${CNVWINDEPS} ${TMPFILE}
|
||||
rm -f ${TMPFILE}
|
Loading…
Reference in New Issue
Block a user