summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-23 03:03:27 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-23 03:03:27 +0000
commit11e91848956821f9a794ae92f98b9204df0dbf12 (patch)
tree96d437b8d7f990235481aff3bfed6e5bf8dc040c /source4
parent1bd5a8ac1a4fea1d0becc6d07c41bdd615753f28 (diff)
downloadsamba-11e91848956821f9a794ae92f98b9204df0dbf12.tar.gz
samba-11e91848956821f9a794ae92f98b9204df0dbf12.tar.bz2
samba-11e91848956821f9a794ae92f98b9204df0dbf12.zip
by using a single proto.h we gain another factor of 4 in the speed of
"make proto" (This used to be commit f6bb118799887e8e29399343e377ba8e9f059f20)
Diffstat (limited to 'source4')
-rw-r--r--source4/Makefile.in56
-rw-r--r--source4/client/client.c1
-rw-r--r--source4/client/clitar.c1
-rw-r--r--source4/script/mkproto.pl15
4 files changed, 12 insertions, 61 deletions
diff --git a/source4/Makefile.in b/source4/Makefile.in
index c721b4caa1..2a789c4fe9 100644
--- a/source4/Makefile.in
+++ b/source4/Makefile.in
@@ -522,7 +522,8 @@ PROTO_OBJ = $(SMBD_OBJ_SRV) \
$(READLINE_OBJ) $(PROFILE_OBJ) $(LIBADS_OBJ) $(LIBADS_SERVER_OBJ) \
$(LIB_SMBD_OBJ) $(SAM_OBJ) $(REGISTRY_OBJ) $(POPT_LIB_OBJ) \
$(RPC_LSA_OBJ) $(RPC_NETLOG_OBJ) $(RPC_SAMR_OBJ) $(RPC_REG_OBJ) \
- $(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ)
+ $(RPC_SVC_OBJ) $(RPC_WKS_OBJ) $(RPC_DFS_OBJ) $(RPC_SPOOLSS_OBJ) \
+ $(CLIENT_OBJ1)
NSS_OBJ_0 = nsswitch/wins.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
$(LIB_OBJ) $(NSSWINS_OBJ)
@@ -1085,20 +1086,12 @@ clean: delheaders python_clean
# exist, not necessarily that they are up to date. Since they're
# removed by "make clean" this will always be run when you do anything
# afterwards.
-proto_exists: include/proto.h include/wrepld_proto.h include/build_env.h \
- nsswitch/winbindd_proto.h web/swat_proto.h \
-@STFS_ENABLED@ ntvfs/tank/vfs_tank_proto.h \
- client/client_proto.h utils/net_proto.h \
+proto_exists: include/proto.h include/build_env.h \
include/tdbsam2_parse_info.h
delheaders:
@echo Removing prototype headers
@/bin/rm -f $(srcdir)/include/proto.h $(srcdir)/include/build_env.h
- @/bin/rm -f $(srcdir)/include/wrepld_proto.h $(srcdir)/nsswitch/winbindd_proto.h
- @/bin/rm -f $(srcdir)/web/swat_proto.h
- @/bin/rm -f $(srcdir)/client/client_proto.h $(srcdir)/utils/net_proto.h
- @/bin/rm -f $(srcdir)/include/tdbsam2_parse_info.h
-@STFS_ENABLED@ @/bin/rm -f $(srcdir)/ntvfs/tank/vfs_tank_proto.h
include/proto.h:
@echo Building include/proto.h
@@ -1110,37 +1103,6 @@ include/build_env.h:
@echo Building include/build_env.h
@cd $(srcdir) && $(SHELL) script/build_env.sh $(srcdir) $(builddir) $(CC) > $(builddir)/include/build_env.h
-include/wrepld_proto.h:
- @echo Building include/wrepld_proto.h
- @cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
- -h _WREPLD_PROTO_H_ $(builddir)/include/wrepld_proto.h \
- $(WREPL_OBJ1)
-
-nsswitch/winbindd_proto.h:
- @cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
- -h _WINBINDD_PROTO_H_ nsswitch/winbindd_proto.h \
- $(WINBINDD_OBJ1)
-
-ntvfs/tank/vfs_tank_proto.h:
- @cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
- -h _VFS_TANK_PROTO_H_ ntvfs/tank/vfs_tank_proto.h \
- $(STFS_OBJS)
-
-web/swat_proto.h:
- @cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
- -h _SWAT_PROTO_H_ web/swat_proto.h \
- $(SWAT_OBJ1)
-
-client/client_proto.h:
- @cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
- -h _CLIENT_PROTO_H_ client/client_proto.h \
- $(CLIENT_OBJ1)
-
-utils/net_proto.h:
- @cd $(srcdir) && $(SHELL) script/mkproto.sh $(PERL) \
- -h _CLIENT_PROTO_H_ utils/net_proto.h \
- $(NET_OBJ1)
-
include/tdbsam2_parse_info.h:
@cd $(srcdir) && $(PERL) -w script/genstruct.pl \
-o include/tdbsam2_parse_info.h $(CC) -E -g \
@@ -1149,17 +1111,7 @@ include/tdbsam2_parse_info.h:
# "make headers" or "make proto" calls a subshell because we need to
# make sure these commands are executed in sequence even for a
# parallel make.
-headers:
- $(MAKE) delheaders; \
- $(MAKE) include/proto.h; \
- $(MAKE) include/build_env.h; \
- $(MAKE) include/wrepld_proto.h; \
- $(MAKE) nsswitch/winbindd_proto.h; \
- $(MAKE) web/swat_proto.h; \
- $(MAKE) client/client_proto.h; \
- $(MAKE) utils/net_proto.h; \
- $(MAKE) include/tdbsam2_parse_info.h; \
-@STFS_ENABLED@ $(MAKE) ntvfs/tank/vfs_tank_proto.h
+headers: delheaders include/proto.h include/build_env.h include/tdbsam2_parse_info.h
proto: headers
diff --git a/source4/client/client.c b/source4/client/client.c
index e0d332ca13..c46c8d8133 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -22,7 +22,6 @@
*/
#include "includes.h"
-#include "../client/client_proto.h"
#ifndef REGISTER
#define REGISTER 0
#endif
diff --git a/source4/client/clitar.c b/source4/client/clitar.c
index 78f44da8ca..8ab54a40c2 100644
--- a/source4/client/clitar.c
+++ b/source4/client/clitar.c
@@ -37,7 +37,6 @@
#include "includes.h"
#include "clitar.h"
-#include "../client/client_proto.h"
static int clipfind(char **aret, int ret, char *tok);
void dos_clean_name(char *s);
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index c5cb374047..66f2799147 100644
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -64,16 +64,17 @@ sub process_file($)
next if ($line =~ /^\/|[;]/);
- if ($line =~ /^FN_/) {
- handle_loadparm($line);
- }
-
next unless ( $line =~ /
^void|^BOOL|^int|^struct|^char|^const|^\w+_[tT]\s|^uint|^unsigned|^long|
^NTSTATUS|^ADS_STATUS|^enum\s.*\(|^DATA_BLOB|^WERROR|^XFILE|^FILE|^DIR|
- ^double|^TDB_CONTEXT|^TDB_DATA|^TALLOC_CTX|^NTTIME
+ ^double|^TDB_CONTEXT|^TDB_DATA|^TALLOC_CTX|^NTTIME|^FN_
/xo);
+ if ($line =~ /^FN_/) {
+ handle_loadparm($line);
+ next;
+ }
+
if ( $line =~ /\(.*\)\s*$/o ) {
chomp $line;
print "$line;\n";
@@ -83,12 +84,12 @@ sub process_file($)
print $line;
while ($line = <FH>) {
- chomp $line;
if ($line =~ /\)\s*$/o) {
+ chomp $line;
print "$line;\n";
last;
}
- print "$line\n";
+ print $line;
}
}