Reviewers: lemzwerg,
https://codereview.appspot.com/577690043/diff/581870043/lily/GNUmakefile File lily/GNUmakefile (right): https://codereview.appspot.com/577690043/diff/581870043/lily/GNUmakefile#newcode15 lily/GNUmakefile:15: LOADLIBES = $(FLOWER_LIB) $(CONFIG_LIBS) On 2020/03/21 05:53:15, lemzwerg wrote: > What's the reason this isn't called `LOADLIBS`? you should ask the GNU project. https://cs.bazel.build/search?q=LOADLIBES+f%3Aakef&num=1350 https://codereview.appspot.com/577690043/diff/581870043/lily/GNUmakefile#newcode18 lily/GNUmakefile:18: EXECUTABLES = $(notdir $(EXECUTABLE)) On 2020/03/21 05:53:15, lemzwerg wrote: > This is a funny name, too. AFAICS, this is just a single name, right? Done. https://codereview.appspot.com/577690043/diff/581870043/lily/GNUmakefile#newcode28 lily/GNUmakefile:28: $(foreach a, $(EXECUTABLES), \ On 2020/03/21 05:53:15, lemzwerg wrote: > Since `EXECUTABLES` is a single name, we don't need a loop. > > And what happened with `SEXECUTABLES`? I removed it. I think SEXECUTABLES stands for Script Executables, which we don't have here. Description: Inline executable-* stepmake templates in lily/GNUmakefile Please review this at https://codereview.appspot.com/577690043/ Affected files (+34, -47 lines): M lily/GNUmakefile D stepmake/stepmake/executable-rules.make D stepmake/stepmake/executable-targets.make D stepmake/stepmake/executable-vars.make Index: stepmake/stepmake/executable-rules.make diff --git a/stepmake/stepmake/executable-rules.make b/stepmake/stepmake/executable-rules.make deleted file mode 100644 index 63c04a869b5966fa7a124a87687fe7a46053a145..0000000000000000000000000000000000000000 --- a/stepmake/stepmake/executable-rules.make +++ /dev/null @@ -1,14 +0,0 @@ - -define MODULE_LIB_template \ -$(1)/$(outdir)/library.a : \ - $(MAKE) -C $(1) -endef - -$(foreach a, $(MODULE_LIBS), $(eval $(call MODULE_LIB_template,$(a)))) - -$(O_FILES): $(outdir)/config.hh - -$(EXECUTABLE): $(O_FILES) $(outdir)/version.hh $(MODULE_LIBS:%=%/$(outdir)/library.a) - $(call ly_progress,Making,$@,) - $(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true - $(CXX) $(ALL_CXXFLAGS) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS) Index: stepmake/stepmake/executable-targets.make diff --git a/stepmake/stepmake/executable-targets.make b/stepmake/stepmake/executable-targets.make deleted file mode 100644 index 7afa1db57964a4ba2a08ac933e2c3371816dd6fa..0000000000000000000000000000000000000000 --- a/stepmake/stepmake/executable-targets.make +++ /dev/null @@ -1,21 +0,0 @@ -default: $(EXECUTABLE) - -exe: $(EXECUTABLE) - -local-install: installexe - -local-uninstall: uninstallexe - -installexe: all - -$(INSTALLPY) -d $(DESTDIR)$(bindir) - $(foreach a, $(EXECUTABLES), \ - $(INSTALLPY) -m 755 $(outdir)/$(a) \ - $(DESTDIR)$(bindir)/$(program_prefix)$(a)$(program_suffix) && ) true - $(INSTALLPY) -c -m 755 $(addprefix $(outdir)/, $(SEXECUTABLES)) $(DESTDIR)$(bindir) - -uninstallexe: - $(foreach a, $(EXECUTABLES), rm -f \ - $(DESTDIR)$(bindir)/$(program_prefix)$(a)$(program_suffix) && ) true - $(foreach a, $(SEXECUTABLES), rm -f $(DESTDIR)$(bindir)/$(a) &&) true - - Index: stepmake/stepmake/executable-vars.make diff --git a/stepmake/stepmake/executable-vars.make b/stepmake/stepmake/executable-vars.make deleted file mode 100644 index c064c6408004357d218e4496aa1d191cceb428f6..0000000000000000000000000000000000000000 --- a/stepmake/stepmake/executable-vars.make +++ /dev/null @@ -1,7 +0,0 @@ -MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a, $(MODULE_LIBS))) -LOADLIBES = $(MODULE_LIBES) $(CONFIG_LIBS) - -EXECUTABLE = $(outdir)/$(NAME) -EXECUTABLES = $(notdir $(EXECUTABLE)) - - Index: lily/GNUmakefile diff --git a/lily/GNUmakefile b/lily/GNUmakefile index bdae4ee441e1b33a5b37b12e4592b8e9c0ac5312..89d55275862e4f147b751b144e2b3acfa673bacc 100644 --- a/lily/GNUmakefile +++ b/lily/GNUmakefile @@ -6,12 +6,44 @@ NAME = lilypond MODULE_LIBS=$(depth)/flower MODULE_INCLUDES= $(depth)/flower/include - HELP2MAN_EXECS = lilypond -STEPMAKE_TEMPLATES=c++ executable po help2man +STEPMAKE_TEMPLATES=c++ po help2man include $(depth)/make/stepmake.make +FLOWER_LIB = $(depth)/flower/$(outdir)/library.a +LOADLIBES = $(FLOWER_LIB) $(CONFIG_LIBS) + +EXECUTABLE = $(outdir)/$(NAME) +EXECUTABLES = $(notdir $(EXECUTABLE)) + +default: $(EXECUTABLE) + +local-install: installexe + +local-uninstall: uninstallexe + +installexe: all + -$(INSTALLPY) -d $(DESTDIR)$(bindir) + $(foreach a, $(EXECUTABLES), \ + $(INSTALLPY) -m 755 $(outdir)/$(a) \ + $(DESTDIR)$(bindir)/$(program_prefix)$(a)$(program_suffix) && ) true + +uninstallexe: + $(foreach a, $(EXECUTABLES), rm -f \ + $(DESTDIR)$(bindir)/$(program_prefix)$(a)$(program_suffix) && ) true + +$(O_FILES): $(outdir)/config.hh + +$(FLOWER_LIB): + $(MAKE) -C $(dirname $@) + +$(EXECUTABLE): $(O_FILES) $(outdir)/version.hh $(FLOWER_LIB) + $(call ly_progress,Making,$@,) + $(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true + $(CXX) $(ALL_CXXFLAGS) -o $@ $(O_FILES) $(LOADLIBES) $(ALL_LDFLAGS) + + ifeq ($(LINK_GXX_STATICALLY),yes) MODULE_LDFLAGS += -L$(outdir) -static-libgcc endif @@ -46,9 +78,6 @@ endif ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/' ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/' -default: - - $(outdir)/libstdc++.a: $(call ly_progress,Making,$@,(symlink)) rm -f $@