r8997: Define CPP for hosts that don't default to 'cpp'
[samba.git] / source4 / build / smb_build / makefile.pm
1 ###########################################################
2 ### SMB Build System                                    ###
3 ### - create output for Makefile                        ###
4 ###                                                     ###
5 ###  Copyright (C) Stefan (metze) Metzmacher 2004       ###
6 ###  Copyright (C) Jelmer Vernooij 2005                 ###
7 ###  Released under the GNU GPL                         ###
8 ###########################################################
9
10 package makefile;
11 use config qw(%config);
12 use strict;
13
14 sub _prepare_path_vars()
15 {
16         my $output;
17
18         $output = << '__EOD__';
19 prefix = @prefix@
20 exec_prefix = @exec_prefix@
21 selftest_prefix = @selftest_prefix@
22 VPATH = @srcdir@
23 srcdir = @srcdir@
24 builddir = @builddir@
25
26 BASEDIR = @prefix@
27 BINDIR = @bindir@
28 SBINDIR = @sbindir@
29 LIBDIR = @libdir@
30 CONFIGDIR = @configdir@
31 localstatedir = @localstatedir@
32 SWATDIR = @swatdir@
33 VARDIR = @localstatedir@
34
35 # The permissions to give the executables
36 INSTALLPERMS = 0755
37
38 # set these to where to find various files
39 # These can be overridden by command line switches (see smbd(8))
40 # or in smb.conf (see smb.conf(5))
41 LOGFILEBASE = @logfilebase@
42 CONFIGFILE = $(CONFIGDIR)/smb.conf
43 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
44 NCALRPCDIR = @localstatedir@/ncalrpc
45
46 # This is where smbpasswd et al go
47 PRIVATEDIR = @privatedir@
48 SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
49
50 # the directory where lock files go
51 LOCKDIR = @lockdir@
52
53 # the directory where pid files go
54 PIDDIR = @piddir@
55
56 MANDIR = @mandir@
57
58 PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\"  -DSBINDIR=\"$(SBINDIR)\" \
59          -DBINDIR=\"$(BINDIR)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
60          -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -DLIBDIR=\"$(LIBDIR)\" \
61          -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\" \
62          -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
63          -DSWATDIR=\"$(SWATDIR)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
64          -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
65 __EOD__
66
67         return $output;
68 }
69
70 sub _prepare_compiler_linker()
71 {
72         return << "__EOD__";
73 SHELL=$config{SHELL}
74 PERL=$config{PERL}
75 CC=$config{CC}
76 CFLAGS=-I\$(srcdir)/include -I\$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -I\$(srcdir)/lib $config{CFLAGS} $config{CPPFLAGS}
77
78 LD=$config{LD}
79 LD_FLAGS=$config{LDFLAGS} -Lbin
80
81 STLD=$config{AR}
82 STLD_FLAGS=-rc
83
84 SHLD=$config{CC}
85 SHLD_FLAGS=$config{LDSHFLAGS} -Lbin
86
87 XSLTPROC=$config{XSLTPROC}
88
89 LEX=$config{LEX}
90 YACC=$config{YACC}
91
92 CPP=$config{CPP}
93
94 DEFAULT_TEST_TARGET=$config{DEFAULT_TEST_TARGET}
95
96 __EOD__
97 }
98
99 sub _prepare_default_rule()
100 {
101         return << '__EOD__';
102 default: all
103
104 __EOD__
105 }
106
107 sub _prepare_SUFFIXES()
108 {
109         return << '__EOD__';
110 .SUFFIXES: .x .c .et .y .l .d .o .h .h.gch .a .so .1 .1.xml .3 .3.xml .5 .5.xml .7 .7.xml
111
112 __EOD__
113 }
114
115 sub _prepare_man_rule($)
116 {
117         my $suffix = shift;
118
119         return << "__EOD__";
120 .$suffix.xml.$suffix:
121         \$(XSLTPROC) -o \$@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \$<
122
123 __EOD__
124 }
125
126 sub _prepare_binaries($)
127 {
128         my $ctx = shift;
129
130         my @bbn_list = ();
131         my @sbn_list = ();
132
133         foreach (values %$ctx) {
134                 next unless defined $_->{OUTPUT_TYPE};
135                 next unless ($_->{OUTPUT_TYPE} eq "BINARY");
136
137                 push(@sbn_list, $_->{OUTPUT}) if ($_->{INSTALLDIR} eq "SBINDIR");
138                 push(@bbn_list, $_->{OUTPUT}) if ($_->{INSTALLDIR} eq "BINDIR");
139         }
140
141         my $bbn = array2oneperline(\@bbn_list);
142         my $sbn = array2oneperline(\@sbn_list);
143         return << "__EOD__";
144 BIN_PROGS = $bbn
145 SBIN_PROGS = $sbn
146 __EOD__
147 }
148
149 sub _prepare_manpages($)
150 {
151         my $ctx = shift;
152
153         my @mp_list = ();
154
155         foreach (values %$ctx) {
156                 push (@mp_list, $_->{MANPAGE}) if (defined($_->{MANPAGE}) and $_->{MANPAGE} ne "");
157         }
158         
159         my $mp = array2oneperline(\@mp_list);
160         return << "__EOD__";
161 MANPAGES = $mp
162
163 __EOD__
164 }
165
166 sub _prepare_dummy_MAKEDIR()
167 {
168         my $ctx = shift;
169
170         return  << '__EOD__';
171 bin/.dummy:
172         @: >> $@ || : > $@
173
174 dynconfig.o: dynconfig.c Makefile
175         @echo Compiling $*.c
176         @$(CC) $(CFLAGS) @PICFLAG@ $(PATH_FLAGS) -c $< -o $@
177 @BROKEN_CC@     -mv `echo $@ | sed 's%^.*/%%g'` $@
178
179 __EOD__
180 }
181
182 sub _prepare_depend_CC_rule()
183 {
184         return << '__EOD__';
185
186 .c.d:
187         @echo "Generating dependencies for $<"
188         @$(CC) -MM -MG -MT $(<:.c=.o) -MF $@ $(CFLAGS) $<
189
190 __EOD__
191 }
192
193 ###########################################################
194 # This function creates a standard make rule which is using $(CC)
195 #
196 # $output = _prepare_std_CC_rule($srcext,$destext,$flags,$message,$comment)
197 #
198 # $srcext -     sourcefile extension
199 #
200 # $destext -    destinationfile extension
201 #
202 # $flags -      additional compiler flags
203 #
204 # $message -    logmessage which is echoed while running this rule
205 #
206 # $comment -    just a comment what this rule should do
207 #
208 # $output -             the resulting output buffer
209 sub _prepare_std_CC_rule($$$$$)
210 {
211         my ($src,$dst,$flags,$message,$comment) = @_;
212
213         return << "__EOD__";
214 # $comment
215 .$src.$dst:
216         \@echo $message \$\*.$src
217         \@\$(CC) `script/cflags.sh \$\@` \$(CFLAGS) $flags -c \$< -o \$\@
218 \@BROKEN_CC\@   -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@
219
220 __EOD__
221 }
222
223 sub array2oneperline($)
224 {
225         my $array = shift;
226         my $output = "";
227
228         foreach (@$array) {
229                 next unless defined($_);
230
231                 $output .= " \\\n\t\t$_";
232         }
233
234         return $output;
235 }
236
237 ###########################################################
238 # This function creates a object file list
239 #
240 # $output = _prepare_var_obj_list($var, $var_ctx)
241 #
242 # $var_ctx -            the subsystem context
243 #
244 # $var_ctx->{NAME}      -       the <var> name
245 # $var_ctx->{OBJ_LIST}  -       the list of objectfiles which sould be linked to this <var>
246 #
247 # $output -             the resulting output buffer
248 sub _prepare_obj_list($$)
249 {
250         my ($var,$ctx) = @_;
251
252         my $tmplist = array2oneperline($ctx->{OBJ_LIST});
253         return "" if ($tmplist eq "");
254
255         return << "__EOD__";
256 $var\_$ctx->{NAME}_OBJS =$tmplist
257 __EOD__
258 }
259
260 sub _prepare_cflags($$)
261 {
262         my ($var,$ctx) = @_;
263
264         my $tmplist = array2oneperline($ctx->{CFLAGS});
265         return "" if ($tmplist eq "");
266
267         return << "__EOD__";
268 $var\_$ctx->{NAME}_CFLAGS =$tmplist
269
270 __EOD__
271 }
272
273 ###########################################################
274 # This function creates a make rule for linking a library
275 #
276 # $output = _prepare_shared_library_rule($library_ctx)
277 #
278 # $library_ctx -                the library context
279 #
280 # $library_ctx->{NAME} -                the library name
281 #
282 # $library_ctx->{DEPEND_LIST} -         the list of rules on which this library depends
283 #
284 # $library_ctx->{LIBRARY_NAME} -        the shared library name
285 # $library_ctx->{LIBRARY_REALNAME} -    the shared library real name
286 # $library_ctx->{LIBRARY_SONAME} - the shared library soname
287 # $library_ctx->{LINK_LIST} -   the list of objectfiles and external libraries
288 #                                       which sould be linked to this shared library
289 # $library_ctx->{LINK_FLAGS} -  linker flags used by this shared library
290 #
291 # $output -             the resulting output buffer
292 sub _prepare_shared_library_rule($)
293 {
294         my $ctx = shift;
295         my $output;
296
297         my $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
298         my $tmpshlink = array2oneperline($ctx->{LINK_LIST});
299         my $tmpshflag = array2oneperline($ctx->{LINK_FLAGS});
300
301         $output = << "__EOD__";
302 LIBRARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
303 LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST =$tmpshlink
304 LIBRARY_$ctx->{NAME}_SHARED_LINK_FLAGS =$tmpshflag
305 #
306
307 $ctx->{TARGET}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) \$(LIBRARY_$ctx->{NAME}_OBJS) bin/.dummy
308         \@echo Linking \$\@
309         \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \\
310                 \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_FLAGS) \\
311                 \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST)
312
313 __EOD__
314
315         if (defined($ctx->{LIBRARY_SONAME})) {
316             $output .= << "__EOD__";
317 # Symlink $ctx->{LIBRARY_SONAME}
318 bin/$ctx->{LIBRARY_SONAME}: bin/$ctx->{LIBRARY_REALNAME} bin/.dummy
319         \@echo Symlink \$\@
320         \@ln -sf $ctx->{LIBRARY_REALNAME} \$\@
321 # Symlink $ctx->{LIBRARY_NAME}
322 bin/$ctx->{LIBRARY_NAME}: bin/$ctx->{LIBRARY_SONAME} bin/.dummy
323         \@echo Symlink \$\@
324         \@ln -sf $ctx->{LIBRARY_SONAME} \$\@
325
326 __EOD__
327         }
328
329 $output .= << "__EOD__";
330 library_$ctx->{NAME}: basics bin/lib$ctx->{LIBRARY_NAME}
331
332 __EOD__
333
334         return $output;
335 }
336
337 sub _prepare_mergedobj_rule($)
338 {
339         my $ctx = shift;
340
341         return "" unless $ctx->{TARGET};
342
343         my $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
344
345         my $output = "$ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST = $tmpdepend\n";
346
347         $output .= "$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJS)\n";
348
349         $output .= "\t\@echo \"Pre-Linking $ctx->{TYPE} $ctx->{NAME}\"\n";
350         $output .= "\t@\$(LD) -r \$($ctx->{TYPE}_$ctx->{NAME}_OBJS) -o $ctx->{TARGET}\n";
351         $output .= "\n";
352
353         return $output;
354 }
355
356 sub _prepare_objlist_rule($)
357 {
358         my $ctx = shift;
359         my $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
360
361         return "" unless $ctx->{TARGET};
362
363         my $output = "$ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST = $tmpdepend\n";
364         $output .= "$ctx->{TARGET}: ";
365         $output .= "\$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_OBJS)\n";
366         $output .= "\t\@touch $ctx->{TARGET}\n";
367
368         return $output;
369 }
370
371 ###########################################################
372 # This function creates a make rule for linking a library
373 #
374 # $output = _prepare_static_library_rule($library_ctx)
375 #
376 # $library_ctx -                the library context
377 #
378 # $library_ctx->{NAME} -                the library name
379 #
380 # $library_ctx->{DEPEND_LIST} -         the list of rules on which this library depends
381 #
382 # $library_ctx->{LIBRARY_NAME} -        the static library name
383 # $library_ctx->{LINK_LIST} -   the list of objectfiles which sould be linked
384 #                                       to this static library
385 # $library_ctx->{LINK_FLAGS} -  linker flags used by this static library
386 #
387 # $output -             the resulting output buffer
388 sub _prepare_static_library_rule($)
389 {
390         my $ctx = shift;
391         my $output;
392
393         my $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
394         my $tmpstlink = array2oneperline($ctx->{LINK_LIST});
395         my $tmpstflag = array2oneperline($ctx->{LINK_FLAGS});
396
397         $output = << "__EOD__";
398 LIBRARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
399 #
400 LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST =$tmpstlink
401 #
402 $ctx->{TARGET}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) \$(LIBRARY_$ctx->{NAME}_OBJS) bin/.dummy
403         \@echo Linking \$@
404         \@\$(STLD) \$(STLD_FLAGS) \$@ \\
405                 \$(LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST)
406
407 library_$ctx->{NAME}: basics $ctx->{TARGET}
408
409 __EOD__
410
411         return $output;
412 }
413
414 ###########################################################
415 # This function creates a make rule for linking a binary
416 #
417 # $output = _prepare_binary_rule($binary_ctx)
418 #
419 # $binary_ctx -         the binary context
420 #
421 # $binary_ctx->{NAME} -         the binary name
422 # $binary_ctx->{BINARY} -       the binary binary name
423 #
424 # $binary_ctx->{DEPEND_LIST} -  the list of rules on which this binary depends
425 # $binary_ctx->{LINK_LIST} -    the list of objectfiles and external libraries
426 #                               which sould be linked to this binary
427 # $binary_ctx->{LINK_FLAGS} -   linker flags used by this binary
428 #
429 # $output -             the resulting output buffer
430 sub _prepare_binary_rule($)
431 {
432         my $ctx = shift;
433
434         my $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
435         my $tmplink = array2oneperline($ctx->{LINK_LIST});
436         my $tmpflag = array2oneperline($ctx->{LINK_FLAGS});
437
438         my $output = << "__EOD__";
439 #
440 BINARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
441 BINARY_$ctx->{NAME}_LINK_LIST =$tmplink
442 BINARY_$ctx->{NAME}_LINK_FLAGS =$tmpflag
443 #
444 bin/$ctx->{BINARY}: bin/.dummy \$(BINARY_$ctx->{NAME}_DEPEND_LIST) \$(BINARY_$ctx->{NAME}_OBJS)
445         \@echo Linking \$\@
446         \@\$(CC) \$(LD_FLAGS) -o \$\@ \\
447                 \$\(BINARY_$ctx->{NAME}_LINK_FLAGS) \\
448                 \$\(BINARY_$ctx->{NAME}_LINK_LIST) \\
449                 \$\(BINARY_$ctx->{NAME}_LINK_FLAGS)
450 binary_$ctx->{BINARY}: basics bin/$ctx->{BINARY}
451
452 __EOD__
453
454         return $output;
455 }
456
457 sub _prepare_custom_rule($)
458 {
459         my $ctx = shift;
460         return "
461 $ctx->{NAME}: bin/.TARGET_$ctx->{NAME}
462
463 bin/.TARGET_$ctx->{NAME}:
464         $ctx->{CMD}
465         touch bin/.TARGET_$ctx->{NAME}
466 ";
467 }
468
469 sub _prepare_proto_rules()
470 {
471         my $output = << '__EOD__';
472 # Making this target will just make sure that the prototype files
473 # exist, not necessarily that they are up to date.  Since they're
474 # removed by 'make clean' this will always be run when you do anything
475 # afterwards.
476 proto_exists: include/proto.h
477
478 delheaders: pch_clean
479         -rm -f $(builddir)/include/proto.h
480
481 include/proto.h:
482         @cd $(srcdir) && $(SHELL) script/mkproto.sh "$(PERL)" \
483           -h _PROTO_H_ $(builddir)/include/proto.h \
484           $(PROTO_PROTO_OBJS)
485
486 # 'make headers' or 'make proto' calls a subshell because we need to
487 # make sure these commands are executed in sequence even for a
488 # parallel make.
489 headers: delheaders proto_exists
490
491 proto: idl headers
492
493 proto_test:
494         @[ -f $(builddir)/include/proto.h ] || $(MAKE) proto
495
496 clean: delheaders heimdal_clean
497         @echo Removing objects
498         @-find . -name '*.o' -exec rm -f '{}' \;
499         @echo Removing binaries
500         @-rm -f bin/*
501         @echo Removing dummy targets
502         @-rm -f bin/.*_*
503         @echo Removing generated files
504         @-rm -rf librpc/gen_*
505
506
507
508
509
510 distclean: clean
511         -rm -f bin/.dummy
512         -rm -f include/config.h include/smb_build.h
513         -rm -f Makefile Makefile.in
514         -rm -f config.status
515         -rm -f config.log config.cache
516         -rm -f samba4-deps.dot
517         -rm -f config.pm config.mk
518         -rm -f lib/registry/winregistry.pc
519 __EOD__
520
521         if ($config{developer} eq "yes") {
522                 $output .= "\t\@-rm -f \$(_ALL_OBJS_OBJS:.o=.d)\n";
523         }
524
525         $output .= << '__EOD__';
526
527 removebackup:
528         -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
529
530 realdistclean: distclean removebackup
531         -rm -f include/config.h.in
532         -rm -f include/version.h
533         -rm -f configure
534         -rm -f $(MANPAGES)
535 __EOD__
536
537         return $output;
538 }
539
540 sub _prepare_make_target($)
541 {
542         my $ctx = shift;
543         my $tmpdepend;
544
545         $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
546
547         return << "__EOD__";
548 $ctx->{TARGET}: basics $tmpdepend
549
550 __EOD__
551 }
552
553 sub _prepare_target_settings($)
554 {
555         my $CTX = shift;
556         my $output = "";
557
558         foreach my $key (values %$CTX) {
559                 if (defined($key->{OBJ_LIST})) {
560                         $output .= _prepare_obj_list($key->{TYPE}, $key);
561                         $output .= _prepare_cflags($key->{TYPE}, $key);
562                 }
563         }
564
565         return $output;
566 }
567
568 sub _prepare_rule_lists($)
569 {
570         my $depend = shift;
571         my $output = "";
572
573         foreach my $key (values %{$depend}) {
574                 next unless defined $key->{OUTPUT_TYPE};
575
576                 ($output .= _prepare_mergedobj_rule($key)) if $key->{OUTPUT_TYPE} eq "MERGEDOBJ";
577                 ($output .= _prepare_objlist_rule($key)) if $key->{OUTPUT_TYPE} eq "OBJLIST";
578                 ($output .= _prepare_static_library_rule($key)) if $key->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
579                 ($output .= _prepare_shared_library_rule($key)) if $key->{OUTPUT_TYPE} eq "SHARED_LIBRARY";
580                 ($output .= _prepare_binary_rule($key)) if $key->{OUTPUT_TYPE} eq "BINARY";
581                 ($output .= _prepare_custom_rule($key) ) if $key->{TYPE} eq "TARGET";
582         }
583
584         $output .= _prepare_proto_rules();
585
586         return $output;
587 }
588
589 ###########################################################
590 # This function prepares the output for Makefile
591 #
592 # $output = _prepare_makefile_in($OUTPUT)
593 #
594 # $OUTPUT -     the global OUTPUT context
595 #
596 # $output -             the resulting output buffer
597 sub _prepare_makefile_in($)
598 {
599         my ($CTX) = @_;
600         my $output;
601
602         $output  = "########################################\n";
603         $output .= "# Autogenerated by config.smb_build.pl #\n";
604         $output .= "########################################\n";
605         $output .= "\n";
606
607         $output .= _prepare_path_vars();
608         $output .= _prepare_compiler_linker();
609         $output .= _prepare_default_rule();
610         $output .= _prepare_SUFFIXES();
611         $output .= _prepare_dummy_MAKEDIR();
612         $output .= _prepare_std_CC_rule("c","o",$config{PICFLAG},"Compiling","Rule for std objectfiles");
613         $output .= _prepare_std_CC_rule("h","h.gch",$config{PICFLAG},"Precompiling","Rule for precompiled headerfiles");
614
615         $output .= _prepare_depend_CC_rule();
616         
617         $output .= _prepare_man_rule("1");
618         $output .= _prepare_man_rule("3");
619         $output .= _prepare_man_rule("5");
620         $output .= _prepare_man_rule("7");
621         $output .= _prepare_manpages($CTX);
622         $output .= _prepare_binaries($CTX);
623         $output .= _prepare_target_settings($CTX);
624         $output .= _prepare_rule_lists($CTX);
625
626         if ($config{developer} eq "yes") {
627                 $output .= <<__EOD__
628 #-include \$(_ALL_OBJS_OBJS:.o=.d)
629 IDL_FILES = \$(wildcard librpc/idl/*.idl)
630 \$(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.c,\$(IDL_FILES)) \\
631 \$(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_\%_c.c,\$(IDL_FILES)) \\
632 \$(patsubst librpc/idl/%.idl,librpc/gen_ndr/ndr_%.h,\$(IDL_FILES)): idl
633 __EOD__
634         }
635
636         return $output;
637 }
638
639 ###########################################################
640 # This function creates Makefile.in from the OUTPUT 
641 # context
642 #
643 # create_makefile_in($OUTPUT)
644 #
645 # $OUTPUT       -       the global OUTPUT context
646 #
647 # $output -             the resulting output buffer
648 sub create_makefile_in($$$)
649 {
650         my ($CTX, $mk, $file) = @_;
651
652         open(MAKEFILE_IN,">$file") || die ("Can't open $file\n");
653         print MAKEFILE_IN _prepare_makefile_in($CTX) . $mk;
654         close(MAKEFILE_IN);
655
656         print "config.smb_build.pl: creating $file\n";
657         return; 
658 }
659
660 1;