r14905: Prevent partly generated files when building using heavy parallel make.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 4 Apr 2006 14:38:05 +0000 (14:38 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:00:14 +0000 (14:00 -0500)
source/librpc/config.mk
source/librpc/tables.pl

index e02937bead05ddaafa8deba3f587151abb368f30..da158a3f5480983ddd2301011e17395f6fb2a878 100644 (file)
@@ -346,7 +346,8 @@ OBJ_FILES = gen_ndr/ndr_winsrepl.o
 REQUIRED_SUBSYSTEMS = LIBNDR NDR_NBT
 
 librpc/gen_ndr/tables.c: $(IDL_NDR_HEADER_FILES)
-       @$(PERL) $(srcdir)/librpc/tables.pl --output=librpc/gen_ndr/tables.c $(IDL_NDR_HEADER_FILES)
+       @echo Generating librpc/gen_ndr/tables.c
+       @$(PERL) $(srcdir)/librpc/tables.pl --output=librpc/gen_ndr/tables.c $(IDL_NDR_HEADER_FILES) > librpc/gen_ndr/tables.c
 
 [SUBSYSTEM::NDR_IFACE_TABLE]
 OBJ_FILES = gen_ndr/tables.o
index 3dbb58853de1327c27c78f1ad4b87c29905a3831..9ad0675cb23a8c77428a7d39176980698474417b 100644 (file)
@@ -25,8 +25,6 @@ sub ShowHelp()
 
            Usage: tables.pl [options] <idlfile>
 
-           Options:
-             --output OUTNAME      put output in OUTNAME.*
            \n";
     exit(0);
 }
@@ -61,16 +59,13 @@ sub process_file($)
        }
 
        if ($found) {
-               print TABLEC "#include \"$filename\"\n";
+               print "#include \"$filename\"\n";
        }
 
        close(FILE);
 }
 
-print "Creating $opt_output\n";
-open(TABLEC, ">$opt_output") || die "failed to open $opt_output\n";
-
-print TABLEC <<EOF;
+print <<EOF;
 
 /* Automatically generated by tables.pl. DO NOT EDIT */
 
@@ -81,7 +76,7 @@ EOF
 
 process_file($_) foreach (@ARGV);
 
-print TABLEC <<EOF;
+print <<EOF;
 
 NTSTATUS dcerpc_register_builtin_interfaces(void)
 {
@@ -92,5 +87,3 @@ $init_fns
        return NT_STATUS_OK;
 }
 EOF
-
-close(TABLEC);