Changeset 1ad4a4a for Makefile.am


Ignore:
Timestamp:
Jul 22, 2009, 12:18:10 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d43edd2
Parents:
df49ff6
git-author:
Anders Kaseorg <andersk@mit.edu> (07/22/09 00:09:53)
git-committer:
Anders Kaseorg <andersk@mit.edu> (07/22/09 00:18:10)
Message:
Makefile.am: Generalize the *.new mechanism for suppressing no-op updates.

Also use cp instead of mv to avoid redundant regenerations of *.new.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    rdf49ff6 r1ad4a4a  
    3838BUILT_SOURCES = $(GEN_C) $(GEN_H)
    3939
     40# Only copy file into place if file.new is different
     41%: %.new
     42        @diff -U0 $@ $< || { \
     43         test -f $@ && echo '$@ changed!'; \
     44         echo cp -f $< $@; \
     45              cp -f $< $@; }
     46
    4047proto: owl_prototypes.h
    4148
     
    4653        perl $< $(filter-out $<,$+) > $@
    4754
    48 # Only move owl_prototypes.h into place if the new one is different
    49 owl_prototypes.h: codelist.pl varstubs.c $(BASE_SRCS) owl.c zcrypt.c
    50         perl $< $(filter-out $<,$+) > owl_prototypes.h.new
    51         @diff -U0 $@ owl_prototypes.h.new || { \
    52          test -f $@ && echo 'Interfaces changed!'; \
    53          echo mv -f owl_prototypes.h.new $@; \
    54               mv -f owl_prototypes.h.new $@; }
     55owl_prototypes.h.new: codelist.pl varstubs.c $(BASE_SRCS) owl.c zcrypt.c
     56        perl $< $(filter-out $<,$+) > $@
    5557
    5658# For emacs flymake-mode
Note: See TracChangeset for help on using the changeset viewer.