1 ###########################################################
2 ### SMB Build System ###
3 ### - create output for Makefile ###
5 ### Copyright (C) Stefan (metze) Metzmacher 2004 ###
6 ### Released under the GNU GPL ###
7 ###########################################################
12 sub _prepare_command_interpreters($)
17 $output = << '__EOD__';
26 sub _prepare_path_vars($)
31 $output = << '__EOD__';
33 exec_prefix=@exec_prefix@
42 CONFIGDIR = @configdir@
43 VARDIR = @localstatedir@
46 # The permissions to give the executables
49 # set these to where to find various files
50 # These can be overridden by command line switches (see smbd(8))
51 # or in smb.conf (see smb.conf(5))
52 LOGFILEBASE = @logfilebase@
53 CONFIGFILE = $(CONFIGDIR)/smb.conf
54 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
55 NCALRPCDIR = @localstatedir@/ncalrpc
57 # This is where smbpasswd et al go
58 PRIVATEDIR = @privatedir@
59 SMB_PASSWD_FILE = $(PRIVATEDIR)/smbpasswd
61 # the directory where lock files go
64 # the directory where pid files go
67 PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATEDIR)\"
68 PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
69 PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\"
70 PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
71 PATH_FLAGS4 = $(PATH_FLAGS3) -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
72 PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
73 -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
74 PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\"
75 PATH_FLAGS7 = $(PATH_FLAGS6) -DSWATDIR=\"$(SWATDIR)\"
76 PATH_FLAGS = $(PATH_FLAGS7) $(PASSWD_FLAGS)
83 sub _prepare_compiler_linker($)
88 $output = << '__EOD__';
90 CFLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -Ilib @CFLAGS@ @CPPFLAGS@
93 LD_FLAGS=@LDFLAGS@ @CFLAGS@ -Lbin
99 SHLD_FLAGS=@LDSHFLAGS@ @LDFLAGS@ -Lbin
107 #############################
108 # return makefile fragment for
109 # target specific rules
110 sub add_target_flags($$)
115 if ($ctx->{TARGET_CFLAGS}) {
116 $output .= << "__EOD__";
117 $name: TARGET_CFLAGS = $ctx->{TARGET_CFLAGS}
124 sub _prepare_default_rule($)
129 $output = << '__EOD__';
137 sub _prepare_SUFFIXES($)
142 $output = << '__EOD__';
144 .SUFFIXES: .c .o .h .h.gch .a .so
156 $output = << '__EOD__';
157 idl_full: build/pidl/idl.pm
158 CPP="@CPP@" PERL="$(PERL)" script/build_idl.sh FULL
160 idl: build/pidl/idl.pm
161 @CPP="@CPP@" PERL="$(PERL)" script/build_idl.sh PARTIAL
163 build/pidl/idl.pm: build/pidl/idl.yp
164 -yapp -s build/pidl/idl.yp
166 pch: proto include/includes.h.gch
169 -rm -f include/includes.h.gch
171 basics: idl proto_exists
173 test: @DEFAULT_TEST_TARGET@
176 SOCKET_WRAPPER_DIR=. ./script/tests/selftest.sh `pwd`/prefix-test
179 ./script/tests/selftest.sh `pwd`/prefix-test
186 sub _prepare_dummy_MAKEDIR()
191 $output = << '__EOD__';
195 dynconfig.o: dynconfig.c Makefile
197 @$(CC) $(CFLAGS) @PICFLAG@ $(PATH_FLAGS) -c $< -o $@
198 @BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
205 ###########################################################
206 # This function creates a standard make rule which is using $(CC)
208 # $output = _prepare_std_CC_rule($srcext,$destext,$flags,$message,$comment)
210 # $srcext - sourcefile extension
212 # $destext - destinationfile extension
214 # $flags - additional compiler flags
216 # $message - logmessage which is echoed while running this rule
218 # $comment - just a comment what this rule should do
220 # $output - the resulting output buffer
221 sub _prepare_std_CC_rule($$$$$)
231 $output = << "__EOD__";
232 ###################################
235 \@echo $message \$\*.$src
236 \@\$(CC) \$(TARGET_CFLAGS) \$(CFLAGS) $flags -c \$< -o \$\@
237 \@BROKEN_CC\@ -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@
239 ###################################
246 sub array2oneperline($)
252 foreach my $str (@{$array}) {
253 if (!defined($str)) {
257 $output .= " \\\n\t\t";
270 foreach my $str (@{$array}) {
271 if (!defined($str)) {
282 ###########################################################
283 # This function creates a object file list
285 # $output = _prepare_var_obj_list($var, $var_ctx)
287 # $var_ctx - the subsystem context
289 # $var_ctx->{NAME} - the <var> name
290 # $var_ctx->{OBJ_LIST} - the list of objectfiles which sould be linked to this <var>
292 # $output - the resulting output buffer
293 sub _prepare_obj_list($$)
298 my $tmplist = array2oneperline($ctx->{OBJ_LIST});
301 ###################################
302 # Start $var $ctx->{NAME} OBJ LIST
303 $var\_$ctx->{NAME}_OBJS =$tmplist
304 # End $var $ctx->{NAME} OBJ LIST
305 ###################################
310 sub _prepare_cflags($$)
315 my $tmplist = array2oneperline($ctx->{CFLAGS});
318 ###################################
319 # Start $var $ctx->{NAME} CFLAGS
320 $var\_$ctx->{NAME}_CFLAGS =$tmplist
321 # End $var $ctx->{NAME} CFLAGS
322 ###################################
327 ###########################################################
328 # This function creates a make rule for linking a library
330 # $output = _prepare_shared_library_rule($library_ctx)
332 # $library_ctx - the library context
334 # $library_ctx->{NAME} - the library name
336 # $library_ctx->{DEPEND_LIST} - the list of rules on which this library depends
338 # $library_ctx->{LIBRARY_NAME} - the shared library name
339 # $library_ctx->{LIBRARY_REALNAME} - the shared library real name
340 # $library_ctx->{LIBRARY_SONAME} - the shared library soname
341 # $library_ctx->{LINK_LIST} - the list of objectfiles and external libraries
342 # which sould be linked to this shared library
343 # $library_ctx->{LINK_FLAGS} - linker flags used by this shared library
345 # $output - the resulting output buffer
346 sub _prepare_shared_library_rule($)
357 $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
359 $tmpshlink = array2oneperline($ctx->{LINK_LIST});
360 $tmpshflag = array2oneperline($ctx->{LINK_FLAGS});
362 $output = << "__EOD__";
363 ###################################
364 # Start Library $ctx->{NAME}
366 LIBRARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
368 LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST =$tmpshlink
369 LIBRARY_$ctx->{NAME}_SHARED_LINK_FLAGS =$tmpshflag
372 # Shared $ctx->{LIBRARY_NAME}
373 $ctx->{TARGET}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy
375 \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \\
376 \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_FLAGS) \\
377 \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST)
381 if (defined($ctx->{LIBRARY_SONAME})) {
382 $output .= << "__EOD__";
383 # Symlink $ctx->{LIBRARY_SONAME}
384 bin/$ctx->{LIBRARY_SONAME}: bin/$ctx->{LIBRARY_REALNAME} bin/.dummy
386 \@ln -sf $ctx->{LIBRARY_REALNAME} \$\@
387 # Symlink $ctx->{LIBRARY_NAME}
388 bin/$ctx->{LIBRARY_NAME}: bin/$ctx->{LIBRARY_SONAME} bin/.dummy
390 \@ln -sf $ctx->{LIBRARY_SONAME} \$\@
395 $output .= << "__EOD__";
396 library_$ctx->{NAME}: basics bin/lib$ctx->{LIBRARY_NAME}
398 # End Library $ctx->{NAME}
399 ###################################
403 $output .= add_target_flags($ctx, "library_" . $ctx->{NAME});
408 sub _prepare_objlist_rule($)
411 return "$t->{TYPE}_$t->{NAME}: \$($t->{TYPE}_$t->{NAME}_OBJS)\n";
414 ###########################################################
415 # This function creates a make rule for linking a library
417 # $output = _prepare_static_library_rule($library_ctx)
419 # $library_ctx - the library context
421 # $library_ctx->{NAME} - the library name
423 # $library_ctx->{DEPEND_LIST} - the list of rules on which this library depends
425 # $library_ctx->{LIBRARY_NAME} - the static library name
426 # $library_ctx->{LINK_LIST} - the list of objectfiles which sould be linked
427 # to this static library
428 # $library_ctx->{LINK_FLAGS} - linker flags used by this static library
430 # $output - the resulting output buffer
431 sub _prepare_static_library_rule($)
442 $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
444 $tmpstlink = array2oneperline($ctx->{LINK_LIST});
445 $tmpstflag = array2oneperline($ctx->{LINK_FLAGS});
447 $output = << "__EOD__";
448 ###################################
449 # Start Library $ctx->{NAME}
451 LIBRARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
453 LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST =$tmpstlink
455 # Static $ctx->{LIBRARY_NAME}
456 $ctx->{TARGET}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy
458 \@\$(STLD) \$(STLD_FLAGS) \$@ \\
459 \$(LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST)
461 library_$ctx->{NAME}: basics $ctx->{TARGET}
462 # End Library $ctx->{NAME}
463 ###################################
467 $output .= add_target_flags($ctx, "library_" . $ctx->{NAME});
472 ###########################################################
473 # This function creates a make rule for linking a binary
475 # $output = _prepare_binary_rule($binary_ctx)
477 # $binary_ctx - the binary context
479 # $binary_ctx->{NAME} - the binary name
480 # $binary_ctx->{BINARY} - the binary binary name
482 # $binary_ctx->{DEPEND_LIST} - the list of rules on which this binary depends
483 # $binary_ctx->{LINK_LIST} - the list of objectfiles and external libraries
484 # which sould be linked to this binary
485 # $binary_ctx->{LINK_FLAGS} - linker flags used by this binary
487 # $output - the resulting output buffer
488 sub _prepare_binary_rule($)
496 $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
497 $tmplink = array2oneperline($ctx->{LINK_LIST});
498 $tmpflag = array2oneperline($ctx->{LINK_FLAGS});
500 $output = << "__EOD__";
501 ###################################
502 # Start Binary $ctx->{BINARY}
504 BINARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
505 BINARY_$ctx->{NAME}_LINK_LIST =$tmplink
506 BINARY_$ctx->{NAME}_LINK_FLAGS =$tmpflag
508 bin/$ctx->{BINARY}: bin/.dummy \$(BINARY_$ctx->{NAME}_DEPEND_LIST)
510 \@\$(LD) \$(LD_FLAGS) -o \$\@ \\
511 \$\(BINARY_$ctx->{NAME}_LINK_FLAGS) \\
512 \$\(BINARY_$ctx->{NAME}_LINK_LIST) \\
513 \$\(BINARY_$ctx->{NAME}_LINK_FLAGS)
514 binary_$ctx->{BINARY}: basics bin/$ctx->{BINARY}
515 # End Binary $ctx->{BINARY}
516 ###################################
520 $output .= add_target_flags($ctx, "binary_" . $ctx->{BINARY});
525 sub _prepare_proto_rules()
529 $output .= << '__EOD__';
530 # Making this target will just make sure that the prototype files
531 # exist, not necessarily that they are up to date. Since they're
532 # removed by 'make clean' this will always be run when you do anything
534 proto_exists: include/proto.h include/build_env.h
536 delheaders: pch_clean
537 -rm -f $(builddir)/include/proto.h $(builddir)/include/build_env.h:
540 @cd $(srcdir) && $(SHELL) script/mkproto.sh "$(PERL)" \
541 -h _PROTO_H_ $(builddir)/include/proto.h \
545 @echo Building include/build_env.h
546 @cd $(srcdir) && $(SHELL) script/build_env.sh $(srcdir) $(builddir) $(CC) > $(builddir)/include/build_env.h
548 # 'make headers' or 'make proto' calls a subshell because we need to
549 # make sure these commands are executed in sequence even for a
551 headers: delheaders proto_exists
556 @[ -f $(builddir)/include/proto.h ] || $(MAKE) proto
559 -rm -f *.o */*.o */*/*.o */*/*/*.o bin/*
564 -rm -f include/config.h
567 -rm -f config.smb_build.*
568 -rm -f config.log config.cache
571 -rm -f *.bak *~ */*.bak */*~ */*/*.bak */*/*~ */*/*/*.bak */*/*/*~
573 realdistclean: distclean removebackup
574 -rm -f include/config.h.in
582 sub _prepare_make_target($)
588 $tmpdepend = array2oneperline($ctx->{DEPEND_LIST});
590 $output = << "__EOD__";
591 ###################################
592 # Start Target $ctx->{TARGET}
593 $ctx->{TARGET}: basics $tmpdepend
594 # End Target $ctx->{TARGET}
595 ###################################
602 sub _prepare_target_settings($)
607 foreach my $key (values %$CTX) {
608 if (defined($key->{OBJ_LIST})) {
609 $output .= _prepare_obj_list($key->{TYPE}, $key);
612 if (defined($key->{OBJ_LIST})) {
613 $output .= _prepare_cflags($key->{TYPE}, $key);
620 sub _prepare_install_rules($)
625 $output .= << '__EOD__';
628 @echo "Samba will be installed into:"
629 @echo " basedir: $(BASEDIR)"
630 @echo " bindir: $(BINDIR)"
631 @echo " sbindir: $(SBINDIR)"
632 @echo " libdir: $(LIBDIR)"
633 @echo " vardir: $(VARDIR)"
634 @echo " privatedir: $(PRIVATEDIR)"
635 @echo " piddir: $(PIDDIR)"
636 @echo " lockdir: $(LOCKDIR)"
637 @echo " swatdir: $(SWATDIR)"
640 @echo "Samba will be compiled with flags:"
641 @echo " CFLAGS = $(CFLAGS)"
642 @echo " LD_FLAGS = $(LD_FLAGS)"
643 @echo " STLD_FLAGS = $(STLD_FLAGS)"
644 @echo " SHLD_FLAGS = $(SHLD_FLAGS)"
646 SBIN_PROGS = bin/smbd
648 BIN_PROGS = bin/smbclient \
653 TORTURE_PROGS = bin/smbtorture \
659 LDB_PROGS = bin/ldbadd \
665 REG_PROGS = bin/regpatch \
671 install: showlayout installbin installtorture installldb installreg installdat installswat
673 # DESTDIR is used here to prevent packagers wasting their time
674 # duplicating the Makefile. Remove it and you will have the privelege
675 # of package each samba release for muliple versions of multiple
676 # distributions and operating systems, or at least supplying patches
677 # to all the packaging files required for this, prior to committing
678 # the removal of DESTDIR. Do not remove it even though you think it
682 @$(SHELL) $(srcdir)/script/installdirs.sh $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(PRIVATEDIR) $(DESTDIR)$(PIDDIR) $(DESTDIR)$(LOCKDIR) $(DESTDIR)$(PRIVATEDIR)/tls
684 installbin: all installdirs
685 @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(SBIN_PROGS)
686 @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(BIN_PROGS)
688 installtorture: all installdirs
689 @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(TORTURE_PROGS)
691 installldb: all installdirs
692 @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(LDB_PROGS)
694 installreg: all installdirs
695 @$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(REG_PROGS)
697 installdat: installdirs
698 @$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR)$(LIBDIR) $(srcdir)
700 installswat: installdirs
701 @$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR)$(SWATDIR) $(srcdir)
703 uninstall: uninstallbin uninstalltorture uninstallldb uninstallreg
706 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(SBIN_PROGS)
709 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(TORTURE_PROGS)
712 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(LDB_PROGS)
715 @$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR)$(BASEDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(VARDIR) $(DESTDIR)$(REG_PROGS)
719 swig: scripting/swig/_tdb.so scripting/swig/_dcerpc.so
721 scripting/swig/tdb_wrap.c: scripting/swig/tdb.i
722 swig -python scripting/swig/tdb.i
724 scripting/swig/_tdb.so: scripting/swig/tdb_wrap.o $(LIBRARY_swig_tdb_DEPEND_LIST)
725 $(SHLD) $(SHLD_FLAGS) -o scripting/swig/_tdb.so scripting/swig/tdb_wrap.o \
726 $(LIBRARY_swig_tdb_SHARED_LINK_LIST) $(LIBRARY_swig_tdb_SHARED_LINK_FLAGS)
728 SWIG_INCLUDES = librpc/gen_ndr/samr.i librpc/gen_ndr/lsa.i librpc/gen_ndr/spoolss.i
730 scripting/swig/dcerpc_wrap.c: scripting/swig/dcerpc.i scripting/swig/samba.i scripting/swig/status_codes.i $(SWIG_INCLUDES)
731 swig -python scripting/swig/dcerpc.i
733 scripting/swig/_dcerpc.so: scripting/swig/dcerpc_wrap.o $(LIBRARY_swig_dcerpc_DEPEND_LIST)
734 $(SHLD) $(SHLD_FLAGS) -o scripting/swig/_dcerpc.so scripting/swig/dcerpc_wrap.o $(LIBRARY_swig_dcerpc_SHARED_LINK_LIST) $(LIBRARY_swig_dcerpc_SHARED_LINK_FLAGS)
737 -rm -f scripting/swig/_tdb.so scripting/swig/tdb.pyc \
738 scripting/swig/tdb.py scripting/swig/tdb_wrap.c \
739 scripting/swig/tdb_wrap.o
744 etags `find $(srcdir) -name "*.[ch]"`
747 ctags `find $(srcdir) -name "*.[ch]"`
754 sub _prepare_rule_lists($)
759 foreach my $key (values %{$depend}) {
760 next if not defined $key->{OUTPUT_TYPE};
761 ($output .= _prepare_objlist_rule($key)) if $key->{OUTPUT_TYPE} eq "OBJLIST";
762 ($output .= _prepare_static_library_rule($key)) if $key->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
763 ($output .= _prepare_shared_library_rule($key)) if $key->{OUTPUT_TYPE} eq "SHARED_LIBRARY";
764 ($output .= _prepare_binary_rule($key)) if $key->{OUTPUT_TYPE} eq "BINARY";
768 $output .= _prepare_IDL($idl_ctx);
770 $output .= _prepare_proto_rules();
772 $output .= _prepare_install_rules($depend);
777 ###########################################################
778 # This function prepares the output for Makefile
780 # $output = _prepare_makefile_in($OUTPUT)
782 # $OUTPUT - the global OUTPUT context
784 # $output - the resulting output buffer
785 sub _prepare_makefile_in($)
790 $output = "########################################\n";
791 $output .= "# Autogenerated by config.smb_build.pl #\n";
792 $output .= "########################################\n";
796 $output .= _prepare_command_interpreters($cmd_ctx);
799 $output .= _prepare_path_vars($path_ctx);
802 $output .= _prepare_compiler_linker($compiler_ctx);
805 $output .= _prepare_default_rule($rules_ctx);
808 $output .= _prepare_SUFFIXES($suffix_ctx);
810 $output .= _prepare_dummy_MAKEDIR();
812 $output .= _prepare_std_CC_rule("c","o",'@PICFLAG@',"Compiling","Rule for std objectfiles");
813 $output .= _prepare_std_CC_rule("h","h.gch",'@PICFLAG@',"Precompiling","Rule for precompiled headerfiles");
815 $output .= _prepare_target_settings($CTX);
817 $output .= _prepare_rule_lists($CTX);
821 foreach my $part (values %{$CTX}) {
822 push (@all, $part->{TARGET}) if defined ($part->{OUTPUT_TYPE}) and $part->{OUTPUT_TYPE} eq "BINARY";
825 $output .= _prepare_make_target({ TARGET => "all", DEPEND_LIST => \@all });
830 ###########################################################
831 # This function creates Makefile.in from the OUTPUT
834 # create_makefile_in($OUTPUT)
836 # $OUTPUT - the global OUTPUT context
838 # $output - the resulting output buffer
839 sub create_makefile_in($$)
844 open(MAKEFILE_IN,">$file") || die ("Can't open $file\n");
845 print MAKEFILE_IN _prepare_makefile_in($CTX);
848 print "config.smb_build.pl: creating $file\n";