Re: modules and amke in 2.0.31pre9

Chris Wedgwood (chris@cyphercom.com)
Wed, 17 Sep 1997 13:43:46 -0400


Message-Id: <199709170017.UAA15789@dcl.MIT.EDU>
From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
To: alan@lxorguk.ukuu.org.uk
Subject: Re: modules and amke in 2.0.31pre9

[...]

It might be useful to have the Makefiles notice whether or not the
contents of the serial.ver file actually changed, and if it didn't
change, don't update the timestamp on the file. It'd probably save a
lot of needless compilations, since often the calling API itself hasn't
changed.

?

Does this work?

-Chris

--- Rules.make.orig Tue Sep 16 21:05:56 1997
+++ Rules.make Wed Sep 17 13:41:47 1997
@@ -164,7 +164,8 @@
$(MODINCL)/%.ver: %.c
$(CC) $(CFLAGS) -E -D__GENKSYMS__ $<\
| $(GENKSYMS) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp
- mv $@.tmp $@
+ @(if [ ! -e $@ ] ; then touch $@ ; fi)
+ @(if cmp -s $@.tmp $@ ; then rm $@.tmp ; else mv $@.tmp $@ ; fi)

$(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver)): $(TOPDIR)/include/linux/autoconf.h