Patch to oaf.m4



Hello.

I think there is a need to standardize and simplify the installation
of type=exe components.  Choosing between installing it on the PATH,
or installing it outside the path (requires handling expansion of
variables in oaf.in files) -- and then, to which path -- makes the
whole thing very messy.

I propose adding two small autoconf and automake macros to
"oaf.m4" that help do all of that.

The autoconf macro is AM_OAF_MAKE_RULES which expands to the
definition of two Makefile rules and two automake directory
targets.

The first make rule is OAF_MAKE_OAFIN_RULE, which expands a few
environment variable references in .oaf.in.in files, outputting
to .oaf.in. files.  The xml-i18n-tools package would then
translate .oaf.in into .oaf files, but if you don't use it,
there's an OAF_MAKE_OAF_RULE that will simply copy it.

The automake directory targets are "objdir" and "oafdir",
such that you can have "obj_PROGRAMS=mycomponent" and
"oaf_DATA=MyOafFile.oaf".  And these default to
"{prefix}/lib/bonobo/components" for objdir, and
"{prefix}/share/oaf" for oafdir.

I'm attaching the patch to implement these additions, please
consider applying it.
--- /opt/gnome/share/aclocal/oaf.m4	Fri Aug 17 03:04:25 2001
+++ oaf/oaf.m4	Fri Dec  3 17:09:35 1999
@@ -182,26 +182,3 @@
   AC_SUBST(OAF_LIBS)
   rm -f conf.oaftest
 ])
-
-# Hack to keep things from expanding already in Makefile.in
-# see xml-i18n-tools
-define([OAF_HACK_SUBST], defn([AC_SUBST]))
-
-AC_DEFUN(AM_OAF_MAKE_RULES,
-[dnl
-dnl Define Makefile rules
-dnl
-OAF_MAKE_OAFIN_RULE='\%.oaf.in : \%.oaf.in.in\
-	sed -e "s|@bindir\@|${bindir}|" -e "s|@libdir\@|${libdir}|" -e "s|@libexecdir\@|${libexecdir}|" -e "s|@objdir\@|${objdir}|" $< > [$]*.oaf.in'
-OAF_MAKE_OAF_RULE='\%.oaf : \%.oaf.in\
-	cp $< [$]*.oaf'
-OAF_HACK_SUBST(OAF_MAKE_OAFIN_RULE)
-OAF_HACK_SUBST(OAF_MAKE_OAF_RULE)
-dnl
-dnl Define install directories for automake
-dnl
-objdir=${libdir}/bonobo/components
-oafdir=${datadir}/oaf
-AC_SUBST(objdir)
-AC_SUBST(oafdir)
-])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]