2004-05-13 10:20:53 +00:00
###########################################################
### SMB Build System ###
### - the main program ###
### ###
### Copyright (C) Stefan (metze) Metzmacher 2004 ###
### Released under the GNU GPL ###
###########################################################
2005-05-28 23:38:52 +00:00
use smb_build::makefile ;
use smb_build::smb_build_h ;
use smb_build::input ;
use smb_build::config_mk ;
use smb_build::output ;
use smb_build::dot ;
2004-11-12 01:40:02 +00:00
use strict ;
2005-06-05 08:29:57 +00:00
my $ config_list = "config.list" ;
2005-06-05 02:00:56 +00:00
2004-05-13 10:20:53 +00:00
sub smb_build_main ($)
{
2004-11-13 18:20:33 +00:00
my $ INPUT = shift ;
2004-05-13 10:20:53 +00:00
2005-06-05 02:00:56 +00:00
my @ mkfiles = split ( '\n' , `grep -v ^# $config_list` ) ;
2004-11-14 22:47:39 +00:00
$| = 1 ;
2004-11-14 16:22:01 +00:00
for my $ mkfile ( @ mkfiles ) {
2005-05-20 23:19:06 +00:00
config_mk:: import_file ( $ INPUT , $ mkfile ) ;
2004-11-14 16:22:01 +00:00
}
2005-05-20 23:19:06 +00:00
my $ DEPEND = input:: check ( $ INPUT ) ;
2004-11-12 02:47:24 +00:00
2005-05-20 23:19:06 +00:00
my $ OUTPUT = output:: create_output ( $ DEPEND ) ;
2004-05-13 10:20:53 +00:00
2005-05-20 23:19:06 +00:00
makefile:: create_makefile_in ( $ OUTPUT , "Makefile.in" ) ;
2004-05-13 10:20:53 +00:00
2005-05-20 23:19:06 +00:00
smb_build_h:: create_smb_build_h ( $ OUTPUT , "include/smb_build.h" ) ;
2004-11-14 16:22:01 +00:00
open DOTTY , ">samba4-deps.dot" ;
2005-05-20 23:19:06 +00:00
print DOTTY dot:: generate ( $ DEPEND ) ;
2004-11-14 16:22:01 +00:00
close DOTTY ;
2004-05-13 15:55:53 +00:00
}
2005-05-20 23:19:06 +00:00
2004-11-12 01:40:02 +00:00
1 ;