proto.h
Martin Pool
mbp at valinux.com
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) \
>prototype.h.new
@if test -f prototype.h && cmp -s prototype.h.new prototype.h; \
then rm -f prototype.h.new; \
echo No changes to prototypes; \
else \
echo Installing new prototype.h; \
mv prototype.h.new prototype.h; \
fi
$(ALL_OBJ): .proto.stamp config.h
--
Martin
VA Linux Systems GnuPG encrypted email preferred
More information about the samba-technical
mailing list