I'm playing around with my plug-in build system at the moment, tidying
up the automake/autoconf stuff as I go (and as I learn about autotools -
I'm a newbie there).  One thing I do is find the Gimp plug-in directory
like so:

/--------
| GIMP_LIBDIR=`$PKG_CONFIG --define-variable=prefix='DESTDIR' \
|    --variable=gimplibdir gimp-2.0`
\--------

On discovering Gimp's own autoconf macro file, I discover that it does
almost what I need:

/--------
|     GIMP_DATA_DIR=`$PKG_CONFIG $pkg_name --variable=gimpdatadir`
|     GIMP_PLUGIN_DIR=`$PKG_CONFIG $pkg_name --variable=gimplibdir`
\--------

The difference being that I have passed in the DESTDIR directory
supplied by Automake and used to target the installation.  Without
this, "make distcheck" fails because it tries to write to the real
plug-ins directory rather than the supplied staging directory.

I'm raising this here rather than submitting a patch to make the macro
more like my own code, because I'm not sure that unconditionally using
PREFIX is a good idea, and I don't yet know how it can be done just for an
Automake environment (anyone?).  But I do think that this functionality
ought to be available to Automake users, particularly as Mitch's Plug-in
Template (on which my plug-in is founded) is Automake-based.
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

Reply via email to