mirror of
https://github.com/openharmony/third_party_liburing.git
synced 2026-07-20 22:58:41 -04:00
0c8d6fff77
A recent commit added `runtests-parallel` target to run the tests in parallel. But it doesn't have a proper build dependency. As such, when doing: make -j clean; make -j runtests-parallel; we got this error: ``` make[1]: Entering directory '/home/ammarfaizi2/app/liburing/test' make[1]: *** No rule to make target '232c93d07b74.t', needed by '232c93d07b74.run_test'. Stop. make[1]: Leaving directory '/home/ammarfaizi2/app/liburing/test' make: *** [Makefile:25: runtests-parallel] Error 2 ``` Add `all` target as the dependency of `runtests-parallel`. While in there, I found the same issue on `runtests-loop` target. Do the same thing for it too. This way the main Makefile will build everything first before trying to execute the tests. Cc: Dylan Yudaken <dylany@fb.com> Fixes:4fb3c9e9c7("Add runtests-loop target") Fixes:a33e908d86("test: add make targets for each test") Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
85 lines
2.2 KiB
Makefile
85 lines
2.2 KiB
Makefile
include Makefile.common
|
|
|
|
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
|
|
|
|
INSTALL=install
|
|
|
|
default: all
|
|
|
|
all:
|
|
@$(MAKE) -C src
|
|
@$(MAKE) -C test
|
|
@$(MAKE) -C examples
|
|
|
|
.PHONY: all install default clean test
|
|
.PHONY: FORCE cscope
|
|
|
|
partcheck: all
|
|
@echo "make partcheck => TODO add tests with out kernel support"
|
|
|
|
runtests: all
|
|
@$(MAKE) -C test runtests
|
|
runtests-loop: all
|
|
@$(MAKE) -C test runtests-loop
|
|
runtests-parallel: all
|
|
@$(MAKE) -C test runtests-parallel
|
|
|
|
config-host.mak: configure
|
|
@if [ ! -e "$@" ]; then \
|
|
echo "Running configure ..."; \
|
|
./configure; \
|
|
else \
|
|
echo "$@ is out-of-date, running configure"; \
|
|
sed -n "/.*Configured with/s/[^:]*: //p" "$@" | sh; \
|
|
fi
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
include config-host.mak
|
|
endif
|
|
|
|
%.pc: %.pc.in config-host.mak $(SPECFILE)
|
|
sed -e "s%@prefix@%$(prefix)%g" \
|
|
-e "s%@libdir@%$(libdir)%g" \
|
|
-e "s%@includedir@%$(includedir)%g" \
|
|
-e "s%@NAME@%$(NAME)%g" \
|
|
-e "s%@VERSION@%$(VERSION)%g" \
|
|
$< >$@
|
|
|
|
install: $(NAME).pc
|
|
@$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) \
|
|
includedir=$(DESTDIR)$(includedir) \
|
|
libdir=$(DESTDIR)$(libdir) \
|
|
libdevdir=$(DESTDIR)$(libdevdir) \
|
|
relativelibdir=$(relativelibdir)
|
|
$(INSTALL) -D -m 644 $(NAME).pc $(DESTDIR)$(libdevdir)/pkgconfig/$(NAME).pc
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man2
|
|
$(INSTALL) -m 644 man/*.2 $(DESTDIR)$(mandir)/man2
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man3
|
|
$(INSTALL) -m 644 man/*.3 $(DESTDIR)$(mandir)/man3
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man7
|
|
$(INSTALL) -m 644 man/*.7 $(DESTDIR)$(mandir)/man7
|
|
|
|
install-tests:
|
|
@$(MAKE) -C test install prefix=$(DESTDIR)$(prefix) datadir=$(DESTDIR)$(datadir)
|
|
|
|
clean:
|
|
@rm -f config-host.mak config-host.h cscope.out $(NAME).pc test/*.dmesg
|
|
@$(MAKE) -C src clean
|
|
@$(MAKE) -C test clean
|
|
@$(MAKE) -C examples clean
|
|
|
|
cscope:
|
|
@cscope -b -R
|
|
|
|
tag-archive:
|
|
@git tag $(TAG)
|
|
|
|
create-archive:
|
|
@git archive --prefix=$(NAME)-$(VERSION)/ -o $(NAME)-$(VERSION).tar.gz $(TAG)
|
|
@echo "The final archive is ./$(NAME)-$(VERSION).tar.gz."
|
|
|
|
archive: clean tag-archive create-archive
|
|
|
|
srpm: create-archive
|
|
$(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE)
|