1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

by using a single proto.h we gain another factor of 4 in the speed of

"make proto"
(This used to be commit f6bb118799887e8e29399343e377ba8e9f059f20)
This commit is contained in:
Andrew Tridgell 2003-11-23 03:03:27 +00:00
parent 1bd5a8ac1a
commit 11e9184895
4 changed files with 12 additions and 61 deletions

View File

@ -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

View File

@ -22,7 +22,6 @@
*/
#include "includes.h"
#include "../client/client_proto.h"
#ifndef REGISTER
#define REGISTER 0
#endif

View File

@ -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);

View File

@ -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;
}
}