Alternative approach to disabling schemas install
- From: Yanko Kaneti <yaneti declera com>
- To: gconf list <gconf-list gnome org>
- Subject: Alternative approach to disabling schemas install
- Date: 10 Sep 2002 17:37:22 +0300
Hi
Don't know about you but I find the current approach for disabling the
schemas installation on demand a bit .... improper - namely the
GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL env var and this code snippet from
gconftool.c:
if (makefile_install_mode &&
g_getenv ("GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL"))
{
g_print (_("GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL is set, not installing
makefile_install_mode = FALSE;
}
uh oh, an underdocumented looongnamed environmant variable to negate
something that we explicitly asked for....
how about something like this addition to gconf.m4
diff -u -b -p -r1.13 gconf.m4.in
--- gconf.m4.in 8 Feb 2002 16:35:52 -0000 1.13
+++ gconf.m4.in 10 Sep 2002 14:13:13 -0000
@@ -30,4 +30,13 @@ AC_DEFUN(AM_GCONF_SOURCE_2,
AC_SUBST(GCONF_SCHEMA_FILE_DIR)
AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files])
+
+ AC_ARG_ENABLE(schemas-install,
+ [ --disable-schemas-install Disable the schemas installation],
+ [case "${enableval}" in
+ yes) schemas_install=true ;;
+ no) schemas_install=false ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-schemas-install) ;;
+ esac],[schemas_install=true])
+ AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test x$schemas_install = xtrue)
])
Which introduces the --disable-schemas-install configure option and
allows something like this in the Makefile.am
if GCONF_SCHEMAS_INSTALL
...ordinary schemas instalation..
endif GCONF_SCHEMAS_INSTALL
Its a bit longer and requires Makefile.am modifications in every package
and not only the spec ... but... it looks cleaner to me.
What do you think?
Regards
Yanko
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]