Files
jerryscript/targets/nuttx-stm32f4/Makefile.travis
T
Akos Kiss 53bd845d9f Move (almost all) Travis CI jobs to container-based infrastructure (#2333)
Container-based VMs promise significantly faster boot times.

More or less related changes:
- Added a JOBNAME to all jobs.
- Added `install-noapt` target to several Makefile.travis files to
  avoid `sudo apt-get install ...` steps. Those installations are
  now handled by the apt addon of Travis. The `install` targets are
  kept anyway to keep the makefiles self-contained.
- Removed a legacy workaround from the Coverity Scan job as it
  isn't necessary anymore to fiddle with the cerificates of
  scan.coverity.com.
- Fixed the Mbed and the Zephyr jobs.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2018-05-16 19:15:15 +09:00

71 lines
3.0 KiB
Makefile

# Copyright JS Foundation and other contributors, http://js.foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Default target for running the build test outside the Travis CI environment.
all:
$(MAKE) install
$(MAKE) script
## Targets for installing build dependencies of the NuttX JerryScript target.
# Install cross-compiler and tools via apt.
install-apt-get-deps:
sudo apt-get install -q -y gcc-arm-none-eabi gperf
# Fetch and build kconfig-frontends (kconfig-conf) from nuttx/tools.
LOCAL_INSTALL:=$(CURDIR)/../local/
install-kconfig:
git clone https://bitbucket.org/nuttx/tools.git ../tools
mkdir -p $(LOCAL_INSTALL)
# FIXME: 'autoreconf --force --install' is a workaround after
# https://bitbucket.org/nuttx/tools/commits/164450f982b404fdc2b3233db51dc3eaa1f08b7f
cd ../tools/kconfig-frontends && autoreconf --force --install && ./configure --disable-mconf --disable-nconf --disable-gconf --disable-qconf --disable-utils --disable-shared --enable-static --prefix=$(LOCAL_INSTALL)
$(MAKE) -C ../tools/kconfig-frontends
$(MAKE) -C ../tools/kconfig-frontends install
# Fetch nuttx/{apps,nuttx} repositories.
install-clone-nuttx:
git clone https://bitbucket.org/nuttx/apps.git ../apps -b nuttx-7.22
git clone https://bitbucket.org/nuttx/nuttx.git ../nuttx -b nuttx-7.22
# Perform all the necessary (JerryScript-independent) installation steps.
install-noapt: install-kconfig install-clone-nuttx
install: install-apt-get-deps install-noapt
## Targets for building NuttX with JerryScript.
# Build JerryScript.
script-build-jerryscript:
tools/build.py --clean --toolchain cmake/toolchain_mcu_stm32f4.cmake --profile=es2015-subset --jerry-cmdline OFF --jerry-libc OFF --lto OFF --jerry-libm ON --all-in-one ON --mem-heap 70 --compile-flag='--sysroot=../nuttx'
# Link in the NuttX JerryScript target directory under the NuttX apps tree.
script-add-jerryscript-app:
ln -s ../../jerryscript/targets/nuttx-stm32f4 ../apps/interpreters/jerryscript
# Configure USB shell.
script-configure-usbnsh:
cd ../nuttx/tools && PATH=$(LOCAL_INSTALL)/bin:$$PATH ./configure.sh stm32f4discovery/usbnsh
# Configure and build the firmware (NuttX with JerryScript).
script: script-build-jerryscript script-add-jerryscript-app script-configure-usbnsh
echo 'CONFIG_HOST_LINUX=y' >> ../nuttx/.config
echo 'CONFIG_ARCH_FPU=y' >> ../nuttx/.config
echo 'CONFIG_JERRYSCRIPT=y'>> ../nuttx/.config
PATH=$(LOCAL_INSTALL)/bin:$$PATH $(MAKE) -C ../nuttx olddefconfig
PATH=$(LOCAL_INSTALL)/bin:$$PATH $(MAKE) -C ../nuttx