"the simplest and most effective Makefile strategy to date"
 
(WITH A MINTY ERROR-FREE FLAVOR! ACTIVE INGREDIENT: PERL)
LPML icon
image showing blend across source files image showing lpml snippet

the clearest path

from <source> to <target>

[THEME SONG]
image of different LPML targets image: LPML is something that both users and developers can understand

Quick Links

Example

Please ask yourself, is the cost of straightforward XML below worth getting rid of bugs?

Defining a software package
 <!-- krbconfexample.lpml -->
 <lpml>
 <targetroot>/</targetroot>
 <category name="system file" type="development">
   <chmod dist='default'>0644</chmod><chown dist='default'>root:root</chown>
   <abbreviation>systemfile</abbreviation>
 </category>
 <category name="standard" type="runtime">
   <chmod dist='default'>0755</chmod><chown dist='default'>root:root</chown>
   <abbreviation>directory</abbreviation>
 </category>
 <directory>
   <targetdir dist='default'>etc</targetdir>
   <categoryname>standard</categoryname>
   <description>
      standard linux directory for configuration files</description>
 </directory>
 <file>
 <source>loncom/krb.conf</source>
 <target dist='default'>etc/krb.conf</target>
 <categoryname>conf</categoryname>
 <description>
  which Kerberos server to contact for specified Kerberos domains
 </description>
 <note>
 list elements are separated by newlines;
 each list element consists of only two subelements separated by a colon
 (Kerberos domain value, and Kerberos server IP address)
 </note>
 </file>
 </lpml>

 
Reading the LPML documentation
 bash$ perldoc lpml_parse.pl

 
Executing the LPML commands
 bash$ cat krbconfexample.lpml | perl lpml_parse.pl install development \
                     default install '/home/user/loncapa' '' > Makefile.install
 bash$ make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" \
            directories
 bash$ make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" files
 bash$ make -f Makefile.install SOURCE="$(SOURCE)" TARGET="$(TARGET)" links

Remember! 99%+ of the time, lpml_parse.pl is bug-free. Any bugs would be due to krbconfexample.lpml.

With LPML, packaging STARTS and ENDS with the editing of ONLY ONE XML file for your entire software package. ONE file for ONE software package; very simple (though you can customize into multiple files if you really want to).

In the future on this site, as more of the LPML tags are formally documented (they are already implemented inside lpml_parse.pl) you will see how LPML allows for generating Makefile.build files as well as testing for source code and operating system dependencies.

Contact

Please send any and all suggestions to Scott.

Installation of LPML

You can download a release from: an existing LPML tarball

You can also visit the CVS repository.

There is one essential file for the lpml software package: lpml_parse.pl.

There are currently two other files with which lpml_parse.pl is packaged: piml_parse.pl and xfml_parse.pl.

In order to run the LPML scripts, you will need an XML parser from www.cpan.org called HTML::TokeParser.

It is recommended that you place these files in /usr/local/lpml/bin/. Here are some example commands:

 bash$ mkdir /usr/local/lpml/bin/
 bash$ mv lpml-0.1-1.tar.gz /usr/local/lpml/bin/
 bash$ cd /usr/local/lpml/bin/
 bash$ tar xzvf lpml-0.1-1.tar.gz
 bash$ chmod a+rx *.pl
 bash$ rm lpml-0.1-1.tar.gz

To view documentation on these scripts, use the perldoc command, e.g.:

 bash$ perldoc /usr/local/lpml/bin/lpml_parse.pl
 bash$ perldoc /usr/local/lpml/bin/piml_parse.pl
 bash$ perldoc /usr/local/lpml/bin/xfml_parse.pl

a colorful picture of a gnu

THE LINUX SURGEON GENERAL HAS FOUND:

Using this software will turn your software into robust and reliably defined software.

Join the fight against software halitosis.

LPML is licensed under the GNU General Public License described at http://www.gnu.org/licenses/gpl.html.


SourceForge.net Logo