About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • License: Freeware
  • Last update: 7 years ago
  • Total downloads: 89
  • Price: Free |
  • Operating system: Linux
  • Publisher: Agent Zhang
See full specifications

linux default iconMakefile::Parser Publisher's description

A Simple Parser for Makefiles

Makefile::Parser is a Simple Parser for Makefiles.


use Makefile::Parser;

$parser = Makefile::Parser->new;

# Equivalent to ->parse('Makefile');
$parser->parse or
die Makefile::Parser->error;

# Get last value assigned to the specified variable 'CC':
print $parser->var('CC');

# Get all the variable names defined in the Makefile:
@vars = $parser->vars;
print join(' ', sort @vars);

@roots = $parser->roots; # Get all the "root targets"
print $roots[0]->name;

@tars = $parser->targets; # Get all the targets
$tar = join("n", $tars[0]->commands);

# Get the default target, say, the first target defined in Makefile:
$tar = $parser->target;

$tar = $parser->target('install');
# Get the name of the target, say, 'install' here:
print $tar->name;

# Get the dependencies for the target 'install':
@depends = $tar->depends;

# Access the shell command used to build the current target.
@cmds = $tar->commands;

# Parse another file using the same Parser object:
$parser->parse('Makefile.old') or
die Makefile::Parser->error;

# Get the target who is specified by variable EXE_FILE
$tar = $parser->target($parser->var('EXE_FILE'));

This is a parser for Makefiles. At this very early stage, the parser only supports a limited set of features, so it may not recognize some advanced features provided by certain make tools like GNU make. Its initial purpose is to provide basic support for another module named Makefile::GraphViz, which is aimed to render the building process specified by a Makefile using the amazing GraphViz library. The Make module is not satisfactory for this purpose, so I decided to build one of my own.

System Requirements:

В· Perl
Program Release Status:
Program Install Support: Install and Uninstall

Makefile::Parser Tags:

Click on a tag to find related softwares

Is Makefile::Parser your software?

Manage your software

Most Popular

linux default icon GDB 7.4
GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it... Read more
linux default icon Coral 0.9.1
Coral is a tool and a development platform to create and transform models and modeling languages.
linux default icon Forum Paid Plus Script 6.1
Forum Paid Pay Per Post Exchange is targeted at forum owners who wish to...
linux default icon sdo 0.6.5
Converts oracle SDO_GEOMETRY objects to WKT and GeoJSON.
linux default icon Get Paid Plus Script 6.1
Get Paid Plus Script

Related Category

» Other (877)
» Tools & Editors (359)
» Web Development (146)