Reviewers: lemzwerg, Message: commit 719b9352fd8f3fb0a904ba7cfde402d8352e0eac Author: Han-Wen Nienhuys <han...@lilypond.org> Date: Sat Mar 21 23:37:34 2020 +0100
Cleanup flower/ makefile Description: Cleanup flower/ makefile * Inline library stepmake template * Inline test stepmake template * Drop unused declarations Please review this at https://codereview.appspot.com/577700045/ Affected files (+34, -26 lines): M flower/GNUmakefile D stepmake/stepmake/library-rules.make D stepmake/stepmake/library-targets.make D stepmake/stepmake/library-vars.make Index: stepmake/stepmake/library-rules.make diff --git a/stepmake/stepmake/library-rules.make b/stepmake/stepmake/library-rules.make deleted file mode 100644 index 62c1da1d85826bc9e414443f85db9f25e499e38a..0000000000000000000000000000000000000000 --- a/stepmake/stepmake/library-rules.make +++ /dev/null @@ -1,11 +0,0 @@ - -$(O_FILES): $(outdir)/config.hh - -$(LIBRARY): $(O_FILES) - $(call ly_progress,Making,$@,) - $(AR) $(ARFLAGS) $@ $(O_FILES) -# thanks to Nelson Beebe for this trick. - $(RANLIB) $@ || $(AR) ts $@ || true - - - Index: stepmake/stepmake/library-targets.make diff --git a/stepmake/stepmake/library-targets.make b/stepmake/stepmake/library-targets.make deleted file mode 100644 index 61bd8f28c010cb5840c4e2b4ba421caf8fad5675..0000000000000000000000000000000000000000 --- a/stepmake/stepmake/library-targets.make +++ /dev/null @@ -1,3 +0,0 @@ -default: $(LIBRARY) - -lib: $(LIBRARY) Index: stepmake/stepmake/library-vars.make diff --git a/stepmake/stepmake/library-vars.make b/stepmake/stepmake/library-vars.make deleted file mode 100644 index 7c01002d530a4db8a44313e91f4c30f217542757..0000000000000000000000000000000000000000 --- a/stepmake/stepmake/library-vars.make +++ /dev/null @@ -1,8 +0,0 @@ -LIB_PREFIX = lib -LIB_SUFFIX = .a - -AR=ar - -# LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX) -LIBRARY = $(outdir)/$(LIB_PREFIX)rary$(LIB_SUFFIX) -INSTALL_LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX) Index: flower/GNUmakefile diff --git a/flower/GNUmakefile b/flower/GNUmakefile index 2b5b304cfa083f3c9be18498f5ee7915ac7e38cb..d93a8488b5ade43a356a2ae0534bef9527d27f8c 100644 --- a/flower/GNUmakefile +++ b/flower/GNUmakefile @@ -1,13 +1,43 @@ depth = .. NAME = flower -MODULE_NAME = flower -README_FILES = NEWS-1.0 NEWS-1.1.46 README TODO -STEPMAKE_TEMPLATES=library c++ po test +STEPMAKE_TEMPLATES= c++ po # test uses LILYPOND_DATADIR LOCALSTEPMAKE_TEMPLATES=lilypond -TEST_MODULE_LIBS = ../flower export top-src-dir + include $(depth)/make/stepmake.make + +TEST_O_FILES := $(filter $(outdir)/test%, $(O_FILES)) +O_FILES := $(filter-out $(outdir)/test%, $(O_FILES)) + +TEST_EXECUTABLE = $(outdir)/test-$(NAME) +TEST_LOADLIBES = $(LIBRARY) $(CXXABI_LIBS) + +# yaffut.hh catches all exceptions, so re-enable -fexceptions for the tests. +$(TEST_O_FILES): EXTRA_CXXFLAGS += -fexceptions + +$(TEST_EXECUTABLE): $(TEST_O_FILES) + $(call ly_progress,Making,$@,) + $(CXX) -o $@ $(TEST_O_FILES) $(TEST_LOADLIBES) $(ALL_LDFLAGS) + +.PHONY: check test + +check: test + +test: $(TEST_EXECUTABLE) + $(TEST_EXECUTABLE) + +AR=ar +LIBRARY = $(outdir)/library.a + +$(O_FILES): $(outdir)/config.hh + +$(LIBRARY): $(O_FILES) + $(call ly_progress,Making,$@,) + $(AR) $(ARFLAGS) $@ $(O_FILES) + $(RANLIB) $@ || $(AR) ts $@ || true + +default: $(LIBRARY)