Build: properly integrate loader.js into build system

AC_CONFIG_FILES in configure.ac works well only with Makefiles.
Other files have to be handled by Makefile.am so depedencies
are tracked properly.

https://fedorahosted.org/freeipa/ticket/6498

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Petr Spacek 2016-11-22 16:07:32 +01:00 committed by Martin Basti
parent 6857de02f3
commit 89739a6c91
3 changed files with 15 additions and 3 deletions

View File

@ -158,11 +158,15 @@ pylint:
PYTHONPATH=$(top_srcdir) $(PYLINT) \
--rcfile=$(top_srcdir)/pylintrc $${FILES}
.PHONY: jslint jslint-ui jslint-ui-test jslint-html
.PHONY: jslint jslint-ui jslint-ui-test jslint-html \
$(top_builddir)/install/ui/src/libs/loader.js
jslint: jslint-ui jslint-ui-test jslint-html
$(top_builddir)/install/ui/src/libs/loader.js:
(cd $(top_builddir)/install/ui/src/libs && make loader.js)
# create temporary symlinks to allow jslint to find libs/loader.js
jslint-ui:
jslint-ui: $(top_builddir)/install/ui/src/libs/loader.js
cd $(top_srcdir)/install/ui; \
$(MKDIR_P) js; \
rm -f js/libs; \

View File

@ -525,7 +525,6 @@ AC_CONFIG_FILES([
install/ui/css/Makefile
install/ui/src/Makefile
install/ui/src/libs/Makefile
install/ui/src/libs/loader.js
install/ui/images/Makefile
install/ui/build/Makefile
install/ui/build/dojo/Makefile

View File

@ -16,6 +16,15 @@ app_DATA = \
nodist_app_DATA = \
loader.js
dist_noinst_DATA = \
loader.js.in
EXTRA_DIST = \
$(app_DATA) \
$(NULL)
loader.js: loader.js.in $(top_builddir)/$(CONFIG_STATUS)
$(AM_V_GEN)sed \
-e 's|@API_VERSION[@]|$(API_VERSION)|g' \
-e 's|@NUM_VERSION[@]|$(NUM_VERSION)|g' \
$< > $@