Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1128 3 #145

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ SUBDIRS = $(shell ls -d */)

PROXY :=

MAKE_LKVS_LOG = /tmp/make_lkvs.log

ifneq ($(https_proxy),)
PROXY := $(https_proxy)
else ifneq ($(HTTPS_PROXY),)
Expand All @@ -16,18 +18,30 @@ PROXY := $(ALL_PROXY)
endif

all:
@for dir in $(SUBDIRS) ; do \
@cat /dev/null > ${MAKE_LKVS_LOG};
@for dir in $(SUBDIRS); do \
if [ -f "$$dir/Makefile" ]; then \
cd $$dir && \
make && \
cd .. || exit 2; \
make || { \
echo " - Make subfolder $${dir} failed." >> ${MAKE_LKVS_LOG}; \
cd ..; \
continue; \
}; \
cd ..; \
fi \
done
cat $(MAKE_LKVS_LOG)
ifeq ($(shell cat $(MAKE_LKVS_LOG)),)
@exit 0
else
@exit 1
endif

clean:
for dir in $(SUBDIRS) ; do \
if [ -f "$$dir/Makefile" ]; then \
make -C $$dir clean || exit 2; \
fi \
@for dir in $(SUBDIRS); do \
if [ -f "$$dir/Makefile" ]; then \
make -C $$dir clean || continue; \
fi \
done
docker_clean:
docker run -it --rm -v $(PWD):/src --name ubuntu_2204_lkvs ubuntu:22.04 make clean
Expand Down
34 changes: 24 additions & 10 deletions tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) 2022 Intel Corporation.

SUBDIRS = $(shell ls -d */)
TOOLSDIRS = $(shell ls -d */)
MAKE_TOOLS_LOG = /tmp/make_tools.log

all:
@for dir in $(SUBDIRS) ; do \
if [ -f "$$dir/Makefile" ]; then \
cd $$dir && \
make && \
cd .. || exit 2; \
@cat /dev/null > ${MAKE_TOOLS_LOG};
@for tooldir in $(TOOLSDIRS); do \
if [ -f "$$tooldir/Makefile" ]; then \
cd $$tooldir && \
make || { \
cd ..; \
echo " - Make tools $${tooldir} failed." >> ${MAKE_TOOLS_LOG}; \
continue; \
}; \
cd ..; \
fi \
done
@cat ${MAKE_TOOLS_LOG}
ifeq ($(shell cat $(MAKE_TOOLS_LOG)),)
@exit 0
else
@exit 1
endif

clean:
for dir in $(SUBDIRS) ; do \
if [ -f "$$dir/Makefile" ]; then \
make -C $$dir clean || exit 2; \
fi \
@for tooldir in $(TOOLSDIRS); do \
if [ -f "$$tooldir/Makefile" ]; then \
make -C $$tooldir clean || continue; \
fi \
done