App-AutoBuild
view release on metacpan or search on metacpan
lib/App/AutoBuild.pm view on Meta::CPAN
-h, --help: dump help
-v: increase verbosity (-vv or more -v's)
0 (default) only show compile/link actions, in shortened form
1 show compile/link actions with full command lines, and at the end a time summary (also shows App::AutoBuild overhead)
2 shows debugging for job numbers (not useful really yet)
-d: increase debugosity (-dd or more -d's)
0 (default) nothing!
1 show which dependencies caused a recompile
2 show stat() calls
-q: be more quiet
--cc=(compiler path): pick a compiler other than gcc
--program=(program): don't compile all targets, just this one
clean: unlink output files/meta file (.autobuild_meta)
=head1 DESCRIPTION
After writing a makefile for my 30th C project, I decided this was dumb and it (the computer) should figure out which object files should be linked in or recompiled. The idea behind this module is you create a build.pl that uses App::AutoBuild and c...
App::AutoBuild will figure out all the object files your C file depends on. A list of included header files (.h) will be computed by GCC and remembered in a cache. At build time, stat() is called on each header file included by your .c file. If an...
This tool isn't supposed to be a make replacement-- there are plenty of those, and at least one great one already in Perl. The idea is that the build system should know enough about the source code to do what you want for you. This replaces all the...
=head1 CAVEATS
For this to work properly, you must have a scheme and follow it. Every .c/.cpp file must have an .h/.hpp file that matches (with the exception of the .c/.cpp file with main()). For now, the .c and .h files must be in the same directory (but this ma...
If you have a .h file and an unrelated .c file with the same name (as in, headers.h and headers.c) in the same folder, the .c file will be compiled and linked in automatically. If this doesn't work well for you, put the .h files without .c files int...
A .autobuild_meta file is created in the current directory so it can remember modification times and dependency lists of files. This will definitely be configurable in a future version!
lib/App/AutoBuild.pm view on Meta::CPAN
-h, --help: dump help
-v: increase verbosity (-vv or more -v's)
0 (default) only show compile/link actions, in shortened form
1 show compile/link actions with full command lines, and at the end a time summary (also shows App::AutoBuild overhead)
2 shows debugging for job numbers (not useful really yet)
-d: increase debugosity (-dd or more -d's)
0 (default) nothing!
1 show which dependencies caused a recompile
2 show stat() calls
clean: unlink output files/meta file ($meta_file)
zap
exit(1);
}
else
{
warn "ignoring unknown commandline option $_";
}
}
lib/App/AutoBuild.pm view on Meta::CPAN
sub mtime
{
my($self, $file) = @_;
if($self->{'mtime_this_run'}{$file})
{
return $self->{'mtime_this_run'}{$file};
}
if($self->{'debug'} > 1)
{
print "stat('$file');\n";
}
my @s = stat($file);
$self->{'mtime_this_run'}{$file} = $s[9];
return $s[9];
}
sub md5
{
my($self, $file) = @_;
if($self->{'md5_this_run'}{$file})
{
return $self->{'md5_this_run'}{$file};
( run in 1.340 second using v1.01-cache-2.11-cpan-49f99fa48dc )