r5917: First step in using the new cli_credentials structure. This patch
[bbaumbach/samba-autobuild/.git] / source4 / build / smb_build / main.pm
1 ###########################################################
2 ### SMB Build System                                    ###
3 ### - the main program                                  ###
4 ###                                                     ###
5 ###  Copyright (C) Stefan (metze) Metzmacher 2004       ###
6 ###  Released under the GNU GPL                         ###
7 ###########################################################
8
9 use makefile;
10 use smb_build_h;
11 use input;
12 use config_mk;
13 use output;
14 use dot;
15 use strict;
16
17 sub smb_build_main($)
18 {
19         my $INPUT = shift;
20         my %SMB_BUILD_CTX = (
21                 INPUT => $INPUT
22         );
23
24         my @mkfiles = (
25                 "dsdb/config.mk",
26                 "gtk/config.mk",
27                 "smbd/config.mk",
28                 "smbd/process_model.mk",
29                 "libnet/config.mk",
30                 "auth/config.mk",
31                 "nsswitch/config.mk",
32                 "lib/basic.mk",
33                 "lib/socket/config.mk",
34                 "lib/ldb/config.mk",
35                 "lib/talloc/config.mk",
36                 "lib/tdb/config.mk",
37                 "lib/registry/config.mk",
38                 "lib/messaging/config.mk",
39                 "lib/events/config.mk",
40                 "lib/popt/config.mk",
41                 "lib/cmdline/config.mk",
42                 "smb_server/config.mk",
43                 "rpc_server/config.mk",
44                 "ldap_server/config.mk",
45                 "winbind/config.mk",
46                 "nbt_server/config.mk",
47                 "libcli/auth/gensec.mk",
48                 "libcli/auth/config.mk",
49                 "libcli/ldap/config.mk",
50                 "libcli/config.mk",
51                 "utils/net/config.mk",
52                 "utils/config.mk",
53                 "ntvfs/posix/config.mk",
54                 "ntvfs/config.mk",
55                 "ntvfs/unixuid/config.mk",
56                 "torture/config.mk",
57                 "librpc/config.mk",
58                 "client/config.mk",
59                 "libcli/libsmb.mk",
60                 "libcli/config.mk",
61                 "libcli/security/config.mk",
62                 "lib/com/config.mk",
63                 "scripting/swig/config.mk",
64         );
65
66         $| = 1;
67
68         for my $mkfile (@mkfiles) {
69                 config_mk::import_file($SMB_BUILD_CTX{INPUT}, $mkfile);
70         }
71
72         %{$SMB_BUILD_CTX{DEPEND}} = input::check(\%SMB_BUILD_CTX);
73         
74         %{$SMB_BUILD_CTX{OUTPUT}} = output::create_output($SMB_BUILD_CTX{DEPEND});
75
76         makefile::create_makefile_in($SMB_BUILD_CTX{OUTPUT});
77
78         smb_build_h::create_smb_build_h($SMB_BUILD_CTX{OUTPUT});
79
80         open DOTTY, ">samba4-deps.dot";
81         print DOTTY dot::generate($SMB_BUILD_CTX{DEPEND});
82         close DOTTY;
83 }
84 1;