autogen.pl Code
Brought to you by:
azatht
File | Date | Author | Commit |
---|---|---|---|
LICENSE | 2006-03-01 | azatht | [r1] Initial commit |
README | 2006-03-01 | azatht | [r1] Initial commit |
autogen.pl | 2006-03-01 | azatht | [r3] version 0.3.0 |
Autogen.pl Usage: First define in @PROGRAMS what programs should be run, 'version', 'argument' and 'alt' is optional¸ 'alt' is a second hiaracry. $EXTRAPATH can be used to add som path that you think is not in $PATH (like local buld paths etc...) %CONFIG is to define static options like the comand lines arguments. %MESSAGES can contain aditional messages to be shown at runtime. sub PRE and POST can contain code to be run before and after script has executed. Example configuration: my @PROGRAMS = ( { name => 'cvs2cl', version => '2.50', argument => '--branches --tags --utc --fsf --prune --tagdates', alt => { name => 'scripts/cvs2cl.pl', argument => '-btT', alt => { name => 'touch', argument => 'ChangeLog', } } }, { name => 'autopoint', version => '0.14', }, { name => 'aclocal', version => '1.9', argument => '--force', }, { name => 'autoheader', version => '2.50', argument => '--force', }, { name => 'libtoolize', version => '1.5', argument => '--force --copy', }, { name => 'automake', version => '1.9', argument => '--add-missing --copy --no-force --include-deps', }, { name => 'autoconf', version => '2.50', }, ); # Extra path to search in addition of $PATH (separate with ':') my $EXTRAPATH="$ENV{'PWD'}/scripts"; # Static configuration options my %CONFIG = ( 'USE_COLORS' => 1, # use colors in output? 'DEBUG' => 0, # se output from programs executed? 'CHECK' => 1, # check for programs? 'EXEC' => 1, # execute programs? ); # Add some messages here if you want... my %MESSAGES = ( 'PRE' => "Preparing package 'example package'\n", 'CHECK' => { 'PRE' => "", 'POST' => "", }, 'EXEC' => { 'PRE' => "", 'POST' => "", }, 'POST' => "Preconfiguration done,\nremember now to run ./configure for configuration of your package\n", ); # If you need to run some extra code before or after main code is run, you can # add that here. sub PRE { # Extra code to be run before everything else } sub POST { system("./configure") system("make") # system("su -c \"make install\"") }