Glib::MakeHelper - Makefile.PL utilities for Glib-based extensions
eval "use Glib::MakeHelper; 1" or complain_that_glib_is_too_old_and_die();
%xspod_files = Glib::MakeHelper->do_pod_files (@xs_files);
package MY; sub postamble { return Glib::MakeHelper->postamble_clean () . Glib::MakeHelper->postamble_docs (@main::xs_files) . Glib::MakeHelper->postamble_rpms ( MYLIB => $build_reqs{MyLib}, ); }
The reasoning behind using this instead of just having you use the 'clean' or 'realclean' keys is that this avoids you having to remember to put Glib's stuff in your Makefile.PL's WriteMakefile arguments.
Create and return the text of Makefile rules to build documentation from the XS files with Glib::ParseXSDoc and Glib::GenPod.
Use this in your MY::postamble to enable autogeneration of POD.
This updates dependencies with the list of pod names generated by an earlier run of "do_pod_files".
There is a special Makefile variable POD_DEPENDS that should be set to the list of files that need to be created before the doc.pl step is run, include files.
There is also a variable BLIB_DONE which should be used as a dependency anywhere a rule needs to be sure that a loadable and working module resides in the blib directory before running.
Use this in your MY::postamble to enable autogeneration of POD.
This updates dependencies with the list of pod names generated by an earlier run of "do_pod_files".
There is a special Makefile variable POD_DEPENDS that should be set to the list of files that need to be created before the doc.pl step is run, include files.
There is also a variable BLIB_DONE which should be used as a dependancy anywhere a rule needs to be sure that a loadable and working module resides in the blib directory before running.
The parameters are a list of key=>value pairs. You must specify at minimum either DEPENDS or XS_FILES.
HASH is a set of search and replace keys for the spec file. All occurences of @key@ in the spec file template perl-$(DISTNAME).spec.in will be replaced with value. 'VERSION' and 'SOURCE' are supplied for you. For example:
Glib::MakeHelper->postamble_rpms ( MYLIB => 2.0.0, # we can work with anything from this up MYLIB_RUN => 2.3.1, # we are actually compiled against this one PERL_GLIB => 1.01, # you must have this version of Glib );
will replace @MYLIB@, @MYLIB_RUN@, and @PERL_GLIB@ in spec file. See the build setups for Glib and Gtk2 for examples.
Note: This function just returns an empty string on Win32.
hacked up and documented by muppet.
This library is free software; you can redistribute it and/or modify it under the terms of the Lesser General Public License (LGPL). For more information, see http://www.fsf.org/licenses/lgpl.txt
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |