autobuild proto.h?
Martin Pool
mbp at samba.org
Tue Mar 12 20:07:07 GMT 2002
I suspect I'm going to get flamed, but...
*** Makefile.in.~1.438.~ Mon Feb 4 11:52:42 2002
--- Makefile.in Wed Mar 13 14:58:47 2002
***************
*** 819,825 ****
$(PROTO_OBJ) : .headers.stamp
! include/proto.h:
@echo rebuilding include/proto.h
@cd $(srcdir) && $(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | egrep -v 'ubiqx/|wrapped'` > $(builddir)/include/proto.h
--- 819,825 ----
$(PROTO_OBJ) : .headers.stamp
! include/proto.h: $(srcdir)/*.c $(srcdir)/*/*.c
@echo rebuilding include/proto.h
@cd $(srcdir) && $(AWK) -f script/mkproto.awk `echo $(PROTO_OBJ) | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort -u | egrep -v 'ubiqx/|wrapped'` > $(builddir)/include/proto.h
I wonder if it might not be worthwhile to automatically rebuild proto.h
when any source file changes?
- It's cheap -- about 0.5s to do "make proto" on my desktop machine.
- It help will avoid confusion for people who are trying to follow
CVS but don't know all the magic.
- It just might catch some cases where people change one source file
but not others that depend upon it. It won't catch them all,
because I'm not proposing at this stage that we rebuild everything
off proto.h, but every one helps.
- It will similarly avoid CVS breakage if people forget to do it by
hand.
- People who don't have awk (really?) shouldn't be modifying source
files anyhow. I'm not proposing to leave proto.h out of the
distribution.
--
Martin
More information about the samba-technical
mailing list