Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e19b7cee authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Michal Marek
Browse files

make use of make variable CURDIR instead of calling pwd



make already provides the current working directory in a variable, so make
use of it instead of forking a shell. Also replace usage of PWD by
CURDIR. PWD is provided by most shells, but not all, so this makes the
build system more robust.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarMichal Marek <mmarek@suse.com>
parent 76bee234
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -119,10 +119,10 @@ CLANG ?= clang

# Trick to allow make to be run from this directory
all:
	$(MAKE) -C ../../ $$PWD/
	$(MAKE) -C ../../ $(CURDIR)/

clean:
	$(MAKE) -C ../../ M=$$PWD clean
	$(MAKE) -C ../../ M=$(CURDIR) clean
	@rm -f *~

# Verify LLVM compiler tools are available and bpf target is supported by llc
+1 −1
Original line number Diff line number Diff line
@@ -13,4 +13,4 @@ HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include
all: modules

modules clean:
	$(MAKE) -C ../.. SUBDIRS=$(PWD) $@
	$(MAKE) -C ../.. SUBDIRS=$(CURDIR) $@
+1 −1
Original line number Diff line number Diff line
ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(shell pwd)))
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
endif

+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ include ../scripts/Makefile.include
bindir ?= /usr/bin

ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(shell pwd)))
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
endif

+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ include ../../scripts/Makefile.include
include ../../scripts/utilities.mak		# QUIET_CLEAN

ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(shell pwd)))
srctree := $(patsubst %/,%,$(dir $(CURDIR)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
#$(info Determined 'srctree' to be $(srctree))
Loading