mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 17:59:33 +07:00
64136fb760
The Makefile lacks a couple of line continuation backslashes in an `if' clause, which can make the subsequent rsync command go awry over the whole filesystem (`rsync -a / /`). /bin/sh: -c: line 5: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored) TEST=$DIR"_test.sh"; \ if [ -e $DIR/$TEST ]; then /bin/sh: -c: line 2: syntax error: unexpected end of file make[1]: [all] Error 1 (ignored) rsync -a $DIR/$TEST $BUILD_TARGET/; [...a myriad of:] [ rsync: readlink_stat("...") failed: Permission denied (13)] [ skipping non-regular file "..."] [ rsync: opendir "..." failed: Permission denied (13)] [and many other errors...] fi make[1]: fi: Command not found make[1]: [all] Error 127 (ignored) done make[1]: done: Command not found make[1]: [all] Error 127 (ignored) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Acked-by: Pintu Agarwal <pintu.ping@gmail.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
47 lines
1.0 KiB
Makefile
47 lines
1.0 KiB
Makefile
SUBDIRS := ion
|
|
|
|
TEST_PROGS := run.sh
|
|
|
|
.PHONY: all clean
|
|
|
|
include ../lib.mk
|
|
|
|
all:
|
|
@for DIR in $(SUBDIRS); do \
|
|
BUILD_TARGET=$(OUTPUT)/$$DIR; \
|
|
mkdir $$BUILD_TARGET -p; \
|
|
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
|
#SUBDIR test prog name should be in the form: SUBDIR_test.sh \
|
|
TEST=$$DIR"_test.sh"; \
|
|
if [ -e $$DIR/$$TEST ]; then \
|
|
rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \
|
|
fi \
|
|
done
|
|
|
|
override define RUN_TESTS
|
|
@cd $(OUTPUT); ./run.sh
|
|
endef
|
|
|
|
override define INSTALL_RULE
|
|
mkdir -p $(INSTALL_PATH)
|
|
install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
|
|
|
|
@for SUBDIR in $(SUBDIRS); do \
|
|
BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \
|
|
mkdir $$BUILD_TARGET -p; \
|
|
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
|
|
done;
|
|
endef
|
|
|
|
override define EMIT_TESTS
|
|
echo "./run.sh"
|
|
endef
|
|
|
|
override define CLEAN
|
|
@for DIR in $(SUBDIRS); do \
|
|
BUILD_TARGET=$(OUTPUT)/$$DIR; \
|
|
mkdir $$BUILD_TARGET -p; \
|
|
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
|
done
|
|
endef
|