Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mayhemheroes/Espruino
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 901889e2848341f1c6756c6e2732f65097aef55d
Choose a base ref
..
head repository: mayhemheroes/Espruino
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b92a7ece8ccfa553f2960f623dc583269400c116
Choose a head ref
Showing with 4 additions and 2 deletions.
  1. +4 −2 Makefile
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -86,8 +86,10 @@ ifeq ($(shell uname),Darwin)
MACOSX=1
CFLAGS+=-D__MACOSX__
STAT_FLAGS='-f ''%z'''
REALPATH='grealpath'
else
STAT_FLAGS='-c ''%s'''
REALPATH='realpath'
endif

ifeq ($(OS),Windows_NT)
@@ -776,11 +778,11 @@ $(PLATFORM_CONFIG_FILE): boards/$(BOARD).py scripts/build_platform_config.py
$(Q)python scripts/build_platform_config.py $(BOARD) $(HEADERFILENAME)

# If realpath exists, use relative paths
ifneq ("$(shell realpath --version > /dev/null;echo "$$?")","0")
ifneq ("$(shell ${REALPATH} --version > /dev/null;echo "$$?")","0")
compile=$(CC) $(CFLAGS) $< -o $@
else
# when macros use __FILE__ this stops us including the whole build path
compile=$(CC) $(CFLAGS) $(shell realpath --relative-to $(shell pwd) $<) -o $@
compile=$(CC) $(CFLAGS) $(shell ${REALPATH} --relative-to $(shell pwd) $<) -o $@
endif

link=$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)