Branch: Tag:

2001-01-12

2001-01-12 01:40:04 by Martin Stjernholm <mast@lysator.liu.se>

Use proxy targets to update the auto-generated header files
interpret_protos.h and language.h only if they change. This can cause
a target like language.h to be out-of-date many times, but since it
runs fast that's not an issue. This technique only works well in
make's that stat the target after the rule and recalculate the
dependencies then. GNU make works like that.

Also moved interpret_protos.h to the source dir and added
modules/linker_options target.

Rev: src/Makefile.in:1.228

1:   # - # $Id: Makefile.in,v 1.227 2001/01/01 15:13:34 mirar Exp $ + # $Id: Makefile.in,v 1.228 2001/01/12 01:40:04 mast Exp $   #      # This line is needed on some machines.
154:    modules/static_module_makefile \    modules/dynamic_module_makefile \    $(SRCDIR)/language.h \ -  interpret_protos.h \ +  $(SRCDIR)/interpret_protos.h \    lib \    @EXTRA_MODULE_REQUIREMENTS@   
486:   # Beware that export archive this includes bison/yacc/byacc source   # and thus has to follow the rules stated in that code.    - full_export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend + full_export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h $(SRCDIR)/interpret_protos.h depend    chmod +x $(SRCDIR)/install-sh    $(RUNPIKE) $(TMP_BINDIR)/export.pike --srcdir="$(SRCDIR)"   
615:    ( test -f remake && $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) ) ) || exit $$?    touch modules/modlist.h    - interpret_protos.h: $(SRCDIR)/interpret_functions.h -  egrep '^OPCODE' <$(SRCDIR)/interpret_functions.h >interpret_protos.h + $(SRCDIR)/interpret_protos.h.src: $(SRCDIR)/interpret_functions.h +  egrep '^OPCODE' <$(SRCDIR)/interpret_functions.h >$(SRCDIR)/interpret_protos.h.src    - lex.o: $(SRCDIR)/lex.c interpret_protos.h + $(SRCDIR)/interpret_protos.h: $(SRCDIR)/interpret_protos.h.src +  @if if test -f $@; then cmp -s $< $@; else false; fi; then \ +  echo "No changes in $@ - leaving old"; \ +  else \ +  echo "cp $< $@"; \ +  cp $< $@; \ +  fi    - interpret.o: $(SRCDIR)/lex.c interpret_protos.h + lex.o: $(SRCDIR)/lex.c $(SRCDIR)/interpret_protos.h    - lex_t.o: $(SRCDIR)/lex_t.c interpret_protos.h + interpret.o: $(SRCDIR)/lex.c $(SRCDIR)/interpret_protos.h    -  + lex_t.o: $(SRCDIR)/lex_t.c $(SRCDIR)/interpret_protos.h +    language.o: $(SRCDIR)/language.c $(SRCDIR)/object.h $(SRCDIR)/interpret.h $(SRCDIR)/program.h    - $(SRCDIR)/language.h: $(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 ) +  mv y.tab.h language.h.src )    -  + $(SRCDIR)/language.h: $(SRCDIR)/language.h.src +  @if if test -f $@; then cmp -s $< $@; else false; fi; then \ +  echo "No changes in $@ - leaving old"; \ +  else \ +  echo "cp $< $@"; \ +  cp $< $@; \ +  fi +    $(SRCDIR)/language.c: $(SRCDIR)/language.h -  touch $(SRCDIR)/language.c +          #
654:   modules/modlist_headers.h: modules/modlist.h    touch modules/modlist_headers.h    + modules/linker_options: modules/modlist.h +  touch modules/linker_options +    module.o: modules/modlist_headers.h modules/modlist.h      $(SRCDIR)/configure: $(SRCDIR)/configure.in