xbps/Makefile
Juan RP 5243eab739 Makefile: in the check target always remove "./result*".
... otherwise you need to remove them manually when re-running
'make check'.
2019-04-19 22:57:42 +02:00

51 lines
1.0 KiB
Makefile

-include config.mk
SUBDIRS = include lib bin data
ifdef BUILD_API_DOCS
SUBDIRS += doc
endif
ifdef BUILD_TESTS
SUBDIRS += tests
endif
all:
@if test ! -e config.mk; then \
echo "You didn't run ./configure ... exiting."; \
exit 1; \
fi
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir || exit 1; \
done
install:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir install || exit 1; \
done
@echo
@echo "Binaries have been installed into $(DESTDIR)$(SBINDIR)."
@echo "Librares have been installed into $(DESTDIR)$(LIBDIR)."
@echo "Configuration file has been installed into $(DESTDIR)$(ETCDIR)."
@echo
@echo "WARNING: Don't forget to rerun ldconfig(1) if $(LIBDIR) is not"
@echo "WARNING: in your ld.so.conf by default."
@echo
uninstall:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir uninstall || exit 1; \
done
check:
-rm -f result.db*
@./run-tests
clean:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir clean || exit 1; \
done
-rm -f result* config.mk _ccflag.{,c,err}
.PHONY: all install uninstall check clean