Makes winbindd_proto handling consistent with the other header files,
authorMartin Pool <mbp@samba.org>
Fri, 17 May 2002 06:59:04 +0000 (06:59 +0000)
committerMartin Pool <mbp@samba.org>
Fri, 17 May 2002 06:59:04 +0000 (06:59 +0000)
so that at least "make clean; make all" doesn't fail.

It's still not safe for parallel builds, i.e. "make clean; make -j3
all" will probably crash, but "make clean; make proto && make -j3 all"
seems OK.  I'm not sure if it is possible to solve that and still
support ancient non-GNU versions of Make.
(This used to be commit 4d202c19997d4219e7f607a725123d5606b9bd8a)

source3/Makefile.in

index 84e806906a49a42445d4eaddf2df742e9bd9778b..e71221bb81172d493483c828df511b902a3330ff 100644 (file)
@@ -470,7 +470,7 @@ TDBBACKUP_OBJ = tdb/tdbbackup.o $(TDBBASE_OBJ)
 ######################################################################
 # now the rules...
 ######################################################################
-all : SHOWFLAGS include/proto.h include/wrepld_proto.h include/build_env.h $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(SHLIBS)
+all : SHOWFLAGS proto_exists $(SPROGS) $(PROGS) $(WINBIND_PROGS) $(WINBIND_SPROGS) $(LPROGS) $(SHLIBS)
 
 pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
 
@@ -831,12 +831,14 @@ clean: delheaders
        -rm -f core */*~ *~ */*.o */*.po */*.po32 */*.@SHLIBEXT@ \
        $(TOPFILES) $(PROGS) $(SPROGS) .headers.stamp
 
-winbindd_proto:
-       @cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
-         -h _WINBINDD_PROTO_H_ nsswitch/winbindd_proto.h \
-         $(WINBINDD_OBJ1)
+# Making this target will just make sure that the prototype files
+# 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
 
 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 include/proto.h include/build_env.h include/wrepld_proto.h nsswitch/winbindd_proto.h 
@@ -855,10 +857,20 @@ include/wrepld_proto.h:
          -h _WREPLD_PROTO_H_ $(builddir)/include/wrepld_proto.h \
          $(WREPL_OBJ1)
 
+nsswitch/winbindd_proto.h: 
+       @cd $(srcdir) && $(SHELL) script/mkproto.sh $(AWK) \
+         -h _WINBINDD_PROTO_H_ nsswitch/winbindd_proto.h \
+         $(WINBINDD_OBJ1)
+
+# "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 include/proto.h include/build_env.h include/wrepld_proto.h winbindd_proto
+       $(MAKE) delheaders include/proto.h include/build_env.h include/wrepld_proto.h nsswitch/winbindd_proto.h
+
+proto: headers winbindd_proto 
 
-proto: headers 
+winbindd_proto: headers
 
 .PHONY: headers proto