kpatch/test/unit/Makefile
Artem Savkov b10e0b7d82 unittests: skip clean if objdir is not present
Don't try to call unittest clean if objfile dir is non-existant (e.g.
when objfile submodule wasn't cloned). Another solution would be to make
clean target dependant on objdir but that would mean downloading a lot
of unneeded data for users who don't run unit-tests.

Fixes: #872

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2018-06-04 13:14:28 +02:00

12 lines
281 B
Makefile

ARCH = $(shell uname -m)
OBJDIR ?= objs/$(ARCH)
.PHONY: all clean
all: Makefile.include
cd $(shell git rev-parse --show-toplevel) && git submodule update --init --rebase
$(MAKE) -C $(OBJDIR)
clean: Makefile.include
if [ -d $(OBJDIR) ]; then $(MAKE) -C $(OBJDIR) clean; fi