Bill Allombert on Wed, 13 Apr 2005 20:05:44 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

patch for using mv-if-diff in src/desc/Makefile


Hello PARI-dev,

Here a patch that make src/desc/Makefile more efficient by using
config/mv-if-diff.

This is important to me because I often tweak the gp2c descriptions
that does not affect PARI/GP itself, so this patch save me some time.

Cheers,
Bill

Index: src/desc/Makefile
===================================================================
RCS file: /home/cvs/pari/src/desc/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- src/desc/Makefile	19 Jul 2004 15:02:34 -0000	1.9
+++ src/desc/Makefile	13 Apr 2005 17:55:30 -0000
@@ -4,23 +4,24 @@
 HEADERS=../language/init.h ../gp/gp_init.h ../gp/highlvl.h ../language/members.h
 HE_DEPS=gen_proto gen_help PARI/822.pm
 DEF=pari.desc
+MVIFDIF=sh ../../config/mv-if-diff
 
 all: $(HEADERS)
 
 $(DEF): ../funclist merge_822 PARI/822.pm
-	$(PERL) merge_822 ../functions/*/* > $(DEF).new && mv $(DEF).new $(DEF)
+	$(PERL) merge_822 ../functions/*/* > $(DEF).new && $(MVIFDIF) $(DEF).new $(DEF)
 
 ../language/members.h: $(DEF) gen_member
-	$(PERL) gen_member $(DEF) > $@.new && mv $@.new $@
+	$(PERL) gen_member $(DEF) > $@.new && $(MVIFDIF) $@.new $@
 
 ../language/init.h: $(DEF) $(HE_DEPS)
-	$(PERL) gen_proto basic $(DEF) > $@.new && $(PERL) gen_help basic $(DEF) >> $@.new && mv $@.new $@
+	$(PERL) gen_proto basic $(DEF) > $@.new && $(PERL) gen_help basic $(DEF) >> $@.new && $(MVIFDIF) $@.new $@
 
 ../gp/gp_init.h: $(DEF) $(HE_DEPS)
-	$(PERL) gen_proto gp $(DEF) > $@.new && $(PERL) gen_help gp $(DEF) >> $@.new && mv $@.new $@
+	$(PERL) gen_proto gp $(DEF) > $@.new && $(PERL) gen_help gp $(DEF) >> $@.new && $(MVIFDIF) $@.new $@
 
 ../gp/highlvl.h: $(DEF) $(HE_DEPS)
-	$(PERL) gen_proto highlevel $(DEF) > $@.new && $(PERL) gen_help  highlevel $(DEF) >> $@.new && mv $@.new $@
+	$(PERL) gen_proto highlevel $(DEF) > $@.new && $(PERL) gen_help  highlevel $(DEF) >> $@.new && $(MVIFDIF) $@.new $@
 
 veryclean:
 	rm -f $(DEF) $(HEADERS)