Branch: Tag:

2001-01-13

2001-01-13 01:14:08 by Martin Stjernholm <mast@lysator.liu.se>

Made the header proxy rule generic. Fixed a dependency bug I introduced earlier.

Rev: src/.cvsignore:1.26
Rev: src/Makefile.in:1.230

1:   # - # $Id: Makefile.in,v 1.229 2001/01/12 20:36:22 grubba Exp $ + # $Id: Makefile.in,v 1.230 2001/01/13 01:14:08 mast Exp $   #      # This line is needed on some machines.
282:    @echo "Done."       - .SUFFIXES: .c .h .o .cmod .pp .pph .protos .xml + .SUFFIXES: .c .h .o .cmod .pp .pph .protos .xml .h_src      .c.xml: pike $(TMP_BINDIR)/autodoc.pike    @$(RUNPIKE) $(TMP_BINDIR)/autodoc.pike "$<" >"$@"
333:   .cmod.c:    ./precompile.sh precompile.pike "$@" "$<"    + # This rule is used for some header files that are generated from the + # source, to avoid excessive rebuilding when the source changes in + # ways that doesn't affect the header. + # + # It can cause a .h target to be out-of-date repeatedly, but since it + # runs fast that's not an issue. This technique only works well in + # make's that stat the target again after the rule has run and + # recalculate the dependencies then. GNU make works like that. + .h_src.h: +  @if if test -f $@; then cmp -s "$<" "$@"; else false; fi; then \ +  echo "No changes in $@ - leaving old"; \ +  else \ +  echo "cp $< $@"; \ +  cp "$<" "$@"; \ +  fi +    force :    @:   
618:    ( test -f remake && $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) ) ) || exit $$?    touch modules/modlist.h    - $(SRCDIR)/interpret_protos.h.src: $(SRCDIR)/interpret_functions.h -  egrep '^OPCODE' <$(SRCDIR)/interpret_functions.h >$(SRCDIR)/interpret_protos.h.src + $(SRCDIR)/interpret_protos.h_src: $(SRCDIR)/interpret_functions.h +  egrep '^OPCODE' <$(SRCDIR)/interpret_functions.h >$(SRCDIR)/interpret_protos.h_src    - $(SRCDIR)/interpret_protos.h: $(SRCDIR)/interpret_protos.h.src -  @if if test -f $@; then cmp -s $(SRCDIR)/interpret_protos.h.src $@; else false; fi; then \ -  echo "No changes in $@ - leaving old"; \ -  else \ -  echo "cp $(SRCDIR)/interpret_protos.h.src $@"; \ -  cp $(SRCDIR)/interpret_protos.h.src $@; \ -  fi -  +    lex.o: $(SRCDIR)/lex.c $(SRCDIR)/interpret_protos.h      interpret.o: $(SRCDIR)/lex.c $(SRCDIR)/interpret_protos.h
637:      language.o: $(SRCDIR)/language.c $(SRCDIR)/object.h $(SRCDIR)/interpret.h $(SRCDIR)/program.h    - $(SRCDIR)/language.h.src: $(SRCDIR)/language.yacc + $(SRCDIR)/language.h_src: $(SRCDIR)/language.yacc    @echo "Expect 1 shift/reduce conflict."    ( cd $(SRCDIR) &&\    $(YACC) $(YFLAGS) language.yacc &&\    mv y.tab.c language.c &&\ -  mv y.tab.h language.h.src ) +  mv y.tab.h language.h_src )    - $(SRCDIR)/language.h: $(SRCDIR)/language.h.src -  @if if test -f $@; then cmp -s $(SRCDIR)/language.h.src $@; else false; fi; then \ -  echo "No changes in $@ - leaving old"; \ -  else \ -  echo "cp $(SRCDIR)/language.h.src $@"; \ -  cp $(SRCDIR)/language.h.src $@; \ -  fi + $(SRCDIR)/language.c: $(SRCDIR)/language.yacc +  touch $(SRCDIR)/language.c    - $(SRCDIR)/language.c: $(SRCDIR)/language.h -  -  +    #   # This rule makes sure that builtin.c is created in the source dir.   #