1
0
Fork 0

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.
master 0.2.9
Mike Gerwitz 2017-11-07 22:38:36 -05:00
parent 0e63bed633
commit b8a4dd010d
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 19 additions and 21 deletions

View File

@ -18,11 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
## ##
path_build = $(srcdir)/build path_build = $(top_builddir)/build
path_tools = $(srcdir)/tools path_tools = $(top_srcdir)/tools
path_lib = $(srcdir)/lib path_lib = $(top_srcdir)/lib
path_test = $(srcdir)/test path_test = $(top_srcdir)/test
path_doc = $(srcdir)/doc path_doc = $(top_srcdir)/doc
path_combine_output = $(path_build)/ease.js path_combine_output = $(path_build)/ease.js
path_combine_output_full = $(path_build)/ease-full.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-changelog \
$(path_tools)/gitlog-to-news $(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 all: combine
mkbuild: $(path_build)
# create build dir
$(path_build):
$(MKDIR_P) "$(path_build)"
combine: reconf $(path_combine_output) $(path_build)/browser-test.html combine: reconf $(path_combine_output) $(path_build)/browser-test.html
# will force a reconfigure (for version data) if in the git repo # 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 # combine all modules into easily redistributable ease.js file (intended for
# browser) # browser)
$(path_combine_output): $(src_js) | mkbuild $(path_combine_output): $(src_js)
$(combine) > "$(path_combine_output)" $(MKDIR_P) "$(path_build)"
$(path_combine_output_full): $(src_js) $(src_tests) | mkbuild $(combine) > $@
INC_TEST=1 "$(combine)" > "${path_combine_output_full}" $(path_combine_output_full): $(src_js) $(src_tests)
$(path_build)/browser-test.html: $(path_browser_test) | $(path_combine_output_full) $(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)" $@ 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/' > $@ cat "$(path_browser_test)" | sed 's/ease-full\.js/ease-full\.min\.js/' > $@
# minification process uses Google Closure compiler # minification process uses Google Closure compiler
min: $(path_build)/ease.min.js $(path_build)/ease-full.min.js \ min: $(path_build)/ease.min.js $(path_build)/ease-full.min.js \
$(path_build)/browser-test-min.html | combine $(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_JAVA
if HAS_CCJAR if HAS_CCJAR
cat $(path_tools)/license-min.tpl > $@ cat $(path_tools)/license-min.tpl > $@
@ -110,7 +107,8 @@ else
endif endif
# externs for compilation process # externs for compilation process
$(path_externs_internal): | mkbuild $(path_externs_internal):
$(MKDIR_P) "$(path_build)"
$(path_tools)/mkexterns > $@ $(path_tools)/mkexterns > $@
doc: doc: