Martin Pool mbp at
Sat Jun 23 07:55:26 GMT 2001

(Please cc me on replies.)

After borrowing tridge's mkproto.awk script for n4, I put in these
Makefile rules, which mean that prototype.h is rebuilt every time, but
it does not in turn require everything else to be rebuilt.  This seems
like a good tradeoff: only changed sources are rebuilt, but errors in
prototypes are caught earlier.

proto: prototype.h

.proto.stamp: prototype.h
	@[ -f $@ ] || touch $@

prototype.h: script/mkproto.awk $(MKPROTO_C)
	@echo Checking prototype.h
	@cd $(srcdir) && $(AWK) -f script/mkproto.awk $(MKPROTO_C) \
	@if test -f prototype.h && cmp -s prototype.h; \
	then rm -f; \
	echo No changes to prototypes; \
	else \
	echo Installing new prototype.h; \
	mv prototype.h; \

$(ALL_OBJ): .proto.stamp config.h

VA Linux Systems                        GnuPG encrypted email preferred

More information about the samba-technical mailing list