diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/Makefile.in | 53 | ||||
-rw-r--r-- | source3/configure.in | 2 | ||||
-rw-r--r-- | source3/script/.cvsignore | 1 | ||||
-rwxr-xr-x | source3/script/mkproto.sh (renamed from source3/script/mkproto.sh.in) | 8 | ||||
-rw-r--r-- | source3/smbd/server.c | 6 |
5 files changed, 32 insertions, 38 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in index f163761059..536d45bd1f 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -41,8 +41,8 @@ INSTALLCLIENTCMD_SH=@INSTALLCLIENTCMD_SH@ INSTALLCLIENTCMD_A=@INSTALLCLIENTCMD_A@ VPATH=@srcdir@ -srcdir=@srcdir@ -builddir=@builddir@ +srcdir=@abs_srcdir@ +builddir=@abs_builddir@ SHELL=/bin/sh # XXX: Perhaps this should be @SHELL@ instead -- apparently autoconf @@ -1239,25 +1239,18 @@ proto_exists: include/proto.h include/wrepld_proto.h include/build_env.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)/smbd/build_options.c + @rm -f include/proto.h include/build_env.h include/wrepld_proto.h \ + nsswitch/winbindd_proto.h web/swat_proto.h \ + client/client_proto.h utils/net_proto.h \ + smbd/build_options.c - @/bin/rm -f include/proto.h include/build_env.h include/wrepld_proto.h \ - nsswitch/winbindd_proto.h web/swat_proto.h \ - client/client_proto.h utils/net_proto.h smbd/build_options.c -# Location of mkproto.sh - -MKPROTO_SH = $(builddir)/script/mkproto.sh +MKPROTO_SH = $(srcdir)/script/mkproto.sh include/proto.h: smbd/build_options.c @echo Building include/proto.h - @$(SHELL) $(MKPROTO_SH) $(AWK) \ + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ -h _PROTO_H_ $(builddir)/include/proto.h \ - $(builddir)/smbd/build_options.o \ - `echo $(PROTO_OBJ) | sed -e 's%\([^ ]* \)%$(srcdir)/\1%g'` + $(PROTO_OBJ) include/build_env.h: script/build_env.sh @echo Building include/build_env.h @@ -1266,29 +1259,29 @@ include/build_env.h: script/build_env.sh include/wrepld_proto.h: @echo Building include/wrepld_proto.h - @$(SHELL) $(MKPROTO_SH) $(AWK) \ + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ -h _WREPLD_PROTO_H_ $(builddir)/include/wrepld_proto.h \ - `echo $(WREPL_OBJ1) | sed -e 's%\([^ ]* \)%$(srcdir)/\1%g'` + $(WREPL_OBJ1) nsswitch/winbindd_proto.h: - @$(SHELL) $(MKPROTO_SH) $(AWK) \ - -h _WINBINDD_PROTO_H_ nsswitch/winbindd_proto.h \ - `echo $(WINBINDD_OBJ1) | sed -e 's%\([^ ]* \)%$(srcdir)/\1%g'` + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ + -h _WINBINDD_PROTO_H_ $(builddir)/nsswitch/winbindd_proto.h \ + $(WINBINDD_OBJ1) web/swat_proto.h: - @$(SHELL) $(MKPROTO_SH) $(AWK) \ - -h _SWAT_PROTO_H_ web/swat_proto.h \ - `echo $(SWAT_OBJ1) | sed -e 's%\([^ ]* \)%$(srcdir)/\1%g'` + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ + -h _SWAT_PROTO_H_ $(builddir)/web/swat_proto.h \ + $(SWAT_OBJ1) client/client_proto.h: - @$(SHELL) $(MKPROTO_SH) $(AWK) \ - -h _CLIENT_PROTO_H_ client/client_proto.h \ - `echo $(CLIENT_OBJ1) | sed -e 's%\([^ ]* \)%$(srcdir)/\1%g'` + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ + -h _CLIENT_PROTO_H_ $(builddir)/client/client_proto.h \ + $(CLIENT_OBJ1) utils/net_proto.h: - @$(SHELL) $(MKPROTO_SH) $(AWK) \ - -h _CLIENT_PROTO_H_ utils/net_proto.h \ - `echo $(NET_OBJ1) | sed -e 's%\([^ ]* \)%$(srcdir)/\1%g'` + @cd $(srcdir) && $(SHELL) $(MKPROTO_SH) $(AWK) \ + -h _CLIENT_PROTO_H_ $(builddir)/utils/net_proto.h \ + $(NET_OBJ1) # "make headers" or "make proto" calls a subshell because we need to # make sure these commands are executed in sequence even for a diff --git a/source3/configure.in b/source3/configure.in index ccc7148c6e..ebe0d44192 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3797,7 +3797,7 @@ dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS CFLAGS_REMOVE_USR_INCLUDE(CFLAGS) CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS) -AC_OUTPUT(include/stamp-h Makefile script/findsmb script/mkproto.sh) +AC_OUTPUT(include/stamp-h Makefile script/findsmb) ################################################# # Print very concise instructions on building/use diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore index 5efd0d33db..7a8114ecd7 100644 --- a/source3/script/.cvsignore +++ b/source3/script/.cvsignore @@ -1,2 +1 @@ findsmb -mkproto.sh diff --git a/source3/script/mkproto.sh.in b/source3/script/mkproto.sh index 8d7d300ff5..2bf96c9b41 100755 --- a/source3/script/mkproto.sh.in +++ b/source3/script/mkproto.sh @@ -1,13 +1,9 @@ -#! /bin/sh -x +#! /bin/sh LANG=C; export LANG LC_ALL=C; export LC_ALL LC_COLLATE=C; export LC_COLLATE -# Need reference point for "mkproto.awk", including when "srcdir != builddir". -# Use of "abs_..." is unpleasant. Is there another way? -abs_srcdir=@abs_srcdir@ - if [ $# -lt 3 ] then echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" @@ -36,7 +32,7 @@ echo creating $header mkdir -p `dirname $header` ${awk} $headeropt \ - -f $abs_srcdir/mkproto.awk $proto_src > $headertmp + -f script/mkproto.awk $proto_src > $headertmp if cmp -s $header $headertmp 2>/dev/null then diff --git a/source3/smbd/server.c b/source3/smbd/server.c index edc7b57ba3..07723cc20e 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -634,6 +634,12 @@ static BOOL init_structs(void ) main program. ****************************************************************************/ +/* Declare prototype for build_options() to avoid having to run it through + mkproto.h. Mixing $(builddir) and $(srcdir) source files in the current + prototype generation system is too complicated. */ + +void build_options(BOOL screen); + int main(int argc,const char *argv[]) { /* shall I run as a daemon */ |