Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Commit

Permalink
Adding Makefiles (#2)
Browse files Browse the repository at this point in the history
* Add Makefile

* fix build break due to lack of robot_ws directory
  • Loading branch information
mm318 authored and x77a1 committed Dec 18, 2018
1 parent 052d29c commit ee83d25
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: all setup build build_simulation bundle bundle_simulation clean clean_simulation_build clean_simulation_bundle
.DEFAULT_GOAL := all

all: bundle

# This forces each step in 'ci' to run in serial, but each step will run all of its commands in parallel
ci:
$(MAKE) setup
$(MAKE) build
$(MAKE) bundle

setup:
scripts/setup.sh

build: build_simulation

build_simulation:
scripts/build.sh ./simulation_ws

bundle: bundle_simulation

bundle_simulation: build_simulation
scripts/bundle.sh ./simulation_ws

clean: clean_simulation_build clean_simulation_bundle

clean_simulation_build:
rm -rf ./simulation_ws/build ./simulation_ws/install

clean_simulation_bundle:
rm -rf ./simulation_ws/bundle
3 changes: 3 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

COLCON_LOG_PATH="$@/logs" colcon build --base-paths "$@" --build-base "$@/build" --install-base "$@/install"
3 changes: 3 additions & 0 deletions scripts/bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

COLCON_LOG_PATH="$@/logs" colcon bundle --base-paths "$@" --build-base "$@/build" --install-base "$@/install" --bundle-base "$@/bundle"
13 changes: 13 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -ex

apt-get update
source /opt/ros/$ROS_DISTRO/setup.sh
rosdep update

apt-get install -y python3-apt python3-pip
pip3 install -U setuptools
pip3 install -U colcon-common-extensions colcon-ros-bundle

rosdep install --from-paths ./simulation_ws/src --ignore-src -r -y

0 comments on commit ee83d25

Please sign in to comment.