geary/Makefile.in
Michael James Gratton 878b9aacae Split test running up into test-engine and test-client.
This allows us to compile the engine tests against the internal VAPI, so
we can unit test internal classes.

* CMakeLists.txt: Add top-level targets test-engine-run and
  test-client-run that execute the respective test binaries. Make
  the tests target depend on them and make them depend on their
  binaries.

* Makefile.in: Add test-client and test-engin targets for convenience.

* src/CMakeLists.txt: Make the right invocation of valac to generate a
  correct geary-engine-internal.vapi. Make gsettings schema generation
  depend on geary-client so it exists for test-client if the main binary
  hasn't been built.

* test/CMakeLists.txt: Split everything up into to builds, one for
  test-engine and the other for test-client. Use geary-engine-internal
  when building test-engine for access to internal classes and members.

* test/engine/util-idle-manager-test.vala,
  test/engine/util-timeout-manager-test.vala: Use Glib MainContext rather
  than the GTK main loop for pumping events so the test cases compile
  without GTK.

* test/test-engine.vala, test/test-client.vala: New main source file for
  test binaries based on old main.vala.
2017-12-18 14:49:04 +11:00

67 lines
1.1 KiB
Makefile

# Makefile.in
#
# Copyright 2016 Software Freedom Conservancy Inc.
BUILD_DIR := build
BINARIES := geary geary-console geary-mailer
BUILD_BINARIES := $(addprefix $(BUILD_DIR)/,$(BINARIES))
.PHONY: all
all:
@$(MAKE) -C $(BUILD_DIR)
@cp $(BUILD_BINARIES) .
.PHONY: install
install:
@$(MAKE) -C $(BUILD_DIR) $@
.PHONY: uninstall
uninstall:
@$(MAKE) -C $(BUILD_DIR) $@
@$(MAKE) -C $(BUILD_DIR) post-uninstall
.PHONY: pot_file
pot_file:
@$(MAKE) -C $(BUILD_DIR) $@
@cp build/po/geary.pot po
.PHONY: clean
clean:
@-$(MAKE) -C $(BUILD_DIR) clean
@-rm -f $(BINARIES)
@-rm -f .stamp
.PHONY: distclean
distclean: clean
@-rm -rf $(BUILD_DIR)
@-rm -f Makefile
.PHONY: tests
tests:
@$(MAKE) -C $(BUILD_DIR) $@
.PHONY: test
test:
@$(MAKE) -C $(BUILD_DIR) tests
.PHONY: test-engine
test-engine:
@$(MAKE) -C $(BUILD_DIR) $@-run
.PHONY: test-client
test-client:
@$(MAKE) -C $(BUILD_DIR) $@-run
.PHONY: dist
dist: tests
@$(MAKE) -C $(BUILD_DIR) dist
@cp build/*.xz .
.PHONY: ubuntu
ubuntu: test
@$(MAKE) -C $(BUILD_DIR) ubuntu
.PHONY: valadoc
valadoc:
@$(MAKE) -C $(BUILD_DIR) valadoc