[Kimchi-devel] [PATCH][Wok 2/2] Change configuration files
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Aug 22 16:38:56 UTC 2016
On 08/12/2016 01:55 PM, Ramon Medeiros wrote:
> Change configure.ac to receive parameter "--with-js-rpms" and set
> Makefile to apply changes when configured by automake.
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
> configure.ac | 11 +++++++++++
> ui/libs/Makefile.am | 10 +++++++++-
> ui/pages/Makefile.am | 9 +++++++++
> 3 files changed, 29 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index c7a2787..bfc8b59 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -85,6 +85,17 @@ AC_ARG_WITH(
> )
> AM_CONDITIONAL([WITH_SPICE], [test "x$with_spice_html5" = xyes])
> +AC_ARG_WITH(
> + [js-rpms],
> + [AS_HELP_STRING([--with-js-rpms],
> + [Build Kimchi with js libraries from rpms @<:@default=no@:>@])],
> + [with_js_rpms="yes"],
> + [with_js_rpms="no"])
> +
> +AM_CONDITIONAL([WITH_JS_RPMS], [test "x$with_js_rpms" == xyes ])
> +AM_CONDITIONAL([WITH_JS_RPMS_FEDORA], [test "x$with_js_rpms" = xyes && -f /etc/redhat_release])
> +AM_CONDITIONAL([WITH_JS_RPMS_UBUNTU], [test "x$with_js_rpms" = xyes && -f /etc/debian_version])
> +
Will all the imported JS files be replaced by RPM packages on
Fedora/RHEL distros?
Is not there any those packages for Ubuntu/Debian?
I am asking that to know if it is not better to have an option per JS
lib instead of just one 'with-js-rpms'.
> AC_CONFIG_FILES([
> po/Makefile.in
> po/gen-pot
> diff --git a/ui/libs/Makefile.am b/ui/libs/Makefile.am
> index 9732499..8614320 100644
> --- a/ui/libs/Makefile.am
> +++ b/ui/libs/Makefile.am
> @@ -17,4 +17,12 @@
> # See the License for the specific language governing permissions and
> # limitations under the License.
> -SUBDIRS = bootstrap jquery jquery-ui bootstrap-select es5-shim jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable typeahead jquery-containsNC lodash datatables moment
> +SUBDIRS = bootstrap-select jquery-i18n list-js jquery-bootgrid bootstrap-switch bootstrap-editable jquery-containsNC datatables
> +
> +if WITH_JS_RPMS_FEDORA
> +SUBDIRS += bootstrap jquery-ui
> +else if WITH_JS_RPMS_UBUNTU
> +SUBDIRS += es5-shim typeahead lodash moment
> +else
> +SUBDIRS += bootstrap jquery-ui es5-shim typeahead lodash moment jquery
> +endif
Is that what it is not working as you said in the cover letter?
> diff --git a/ui/pages/Makefile.am b/ui/pages/Makefile.am
> index dde6026..d08909b 100644
> --- a/ui/pages/Makefile.am
> +++ b/ui/pages/Makefile.am
> @@ -17,6 +17,15 @@
> # See the License for the specific language governing permissions and
> # limitations under the License.
> +if WITH_JS_RPMS_FEDORA
> +sh -c 'cp login.html.tmpl.fedora login.html.tmpl'
> +sh -c 'cp wok-ui.html.tmpl.fedora wok-ui.html.tmpl'
> +endif
> +if WITH_JS_RPMS_UBUNTU
> +sh -c 'cp login.html.tmpl.ubuntu login.html.tmpl'
> +sh -c 'cp wok-ui.html.tmpl.ubuntu wok-ui.html.tmpl'
> +endif
> +
> SUBDIRS = help tabs
Using the .html.tmpl file with variables (as I explained in the previous
patch) you will not need the above block of code.
> htmldir = $(datadir)/wok/ui/pages
More information about the Kimchi-devel
mailing list