From b8a4dd010dbc8e4b0f1f8a93d14af3e880ccf3c5 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 7 Nov 2017 22:38:36 -0500 Subject: [PATCH] make distcheck fixes In particular, creating the build/ directory during VPATH builds was problematic. I wasted too much time on this, so I opted for simply creating the directory in each of the targets. * Makefile.am: Use {=>top_}srcdir. Create $(path_build) in each target as needed. (path_build): Use top_builddir. (PHONY): Remove mkbuild target. (mkbuild, $(path_build)): Remove targets. --- Makefile.am | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/Makefile.am b/Makefile.am index 13d9271..87b15f5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,11 +18,11 @@ # along with this program. If not, see . ## -path_build = $(srcdir)/build -path_tools = $(srcdir)/tools -path_lib = $(srcdir)/lib -path_test = $(srcdir)/test -path_doc = $(srcdir)/doc +path_build = $(top_builddir)/build +path_tools = $(top_srcdir)/tools +path_lib = $(top_srcdir)/lib +path_test = $(top_srcdir)/test +path_doc = $(top_srcdir)/doc path_combine_output = $(path_build)/ease.js path_combine_output_full = $(path_build)/ease-full.js @@ -59,17 +59,10 @@ EXTRA_DIST = AUTHORS NEWS ChangeLog README.md HACKING INSTALL \ $(path_tools)/gitlog-to-changelog \ $(path_tools)/gitlog-to-news -.PHONY: mkbuild combine min doc check test test-suite perf FORCE +.PHONY: combine min doc check test test-suite perf FORCE all: combine -mkbuild: $(path_build) - -# create build dir -$(path_build): - $(MKDIR_P) "$(path_build)" - - combine: reconf $(path_combine_output) $(path_build)/browser-test.html # will force a reconfigure (for version data) if in the git repo @@ -78,19 +71,23 @@ reconf: # combine all modules into easily redistributable ease.js file (intended for # browser) -$(path_combine_output): $(src_js) | mkbuild - $(combine) > "$(path_combine_output)" -$(path_combine_output_full): $(src_js) $(src_tests) | mkbuild - INC_TEST=1 "$(combine)" > "${path_combine_output_full}" -$(path_build)/browser-test.html: $(path_browser_test) | $(path_combine_output_full) +$(path_combine_output): $(src_js) + $(MKDIR_P) "$(path_build)" + $(combine) > $@ +$(path_combine_output_full): $(src_js) $(src_tests) + $(MKDIR_P) "$(path_build)" + INC_TEST=1 "$(combine)" > $@ +$(path_build)/browser-test.html: $(path_browser_test) $(path_combine_output_full) + $(MKDIR_P) "$(path_build)" cp -f "$(path_browser_test)" $@ -$(path_build)/browser-test-min.html: $(path_browser_test) | $(path_combine_output_full) +$(path_build)/browser-test-min.html: $(path_browser_test) $(path_combine_output_full) + $(MKDIR_P) "$(path_build)" cat "$(path_browser_test)" | sed 's/ease-full\.js/ease-full\.min\.js/' > $@ # minification process uses Google Closure compiler min: $(path_build)/ease.min.js $(path_build)/ease-full.min.js \ $(path_build)/browser-test-min.html | combine -build/%.min.js: build/%.js $(path_tools)/externs-global.js $(path_externs_internal) +$(path_build)/%.min.js: $(path_build)/%.js $(path_tools)/externs-global.js $(path_externs_internal) if HAS_JAVA if HAS_CCJAR cat $(path_tools)/license-min.tpl > $@ @@ -110,7 +107,8 @@ else endif # externs for compilation process -$(path_externs_internal): | mkbuild +$(path_externs_internal): + $(MKDIR_P) "$(path_build)" $(path_tools)/mkexterns > $@ doc: