[llvm-commits] CVS: llvm/Makefile Makefile.common

John Criswell criswell at cs.uiuc.edu
Tue Aug 12 13:52:01 PDT 2003


Changes in directory llvm:

Makefile updated: 1.4 -> 1.5
Makefile.common updated: 1.109 -> 1.110

---
Log message:

Merged in changes between PRE11_ROOT and LLVM_PRE111 (i.e. the beginning of
the pre-release 1.1 branch and pre-release 1.1.1).
Made the USE_SPEC option work.
Silenced unnecessary error output from the cmp command when checking for
updates to lex/yacc generated files.  This fixes a problem where we get error
messages the first time the file is generated.
Fixed the distclean option.  It is now in the Makefile (i.e. only runs in the
top level source directory), removes more files, and plays nicely with
external project Makefiles.



---
Diffs of the changes:

Index: llvm/Makefile
diff -u llvm/Makefile:1.4 llvm/Makefile:1.5
--- llvm/Makefile:1.4	Wed Jun 11 08:55:26 2003
+++ llvm/Makefile	Tue Aug 12 13:51:48 2003
@@ -6,3 +6,11 @@
 
 test :: all
 	cd test; $(MAKE)
+
+distclean:: clean
+	$(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
+	                  $(LEVEL)/include/Config/config.h \
+	                  $(LEVEL)/autoconf/autom4te.cache \
+	                  $(LEVEL)/config.log \
+	                  $(LEVEL)/TAGS
+


Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.109 llvm/Makefile.common:1.110
--- llvm/Makefile.common:1.109	Wed Aug  6 16:44:22 2003
+++ llvm/Makefile.common	Tue Aug 12 13:51:48 2003
@@ -727,7 +727,7 @@
           $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
           $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
               > $@.tmp
-	$(VERB) cmp $@ $@.tmp > /dev/null || ${MV} -f $@.tmp $@
+	$(VERB) cmp -s $@ $@.tmp > /dev/null || ${MV} -f $@.tmp $@
 	@# remove the output of flex if it didn't get moved over...
 	@rm -f $@.tmp
 
@@ -737,8 +737,8 @@
 %.cpp %.h : %.y
 	@echo Bison\'ing $<...
 	$(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y
-	$(VERB) cmp $*.tab.c $*.cpp > /dev/null || ${MV} -f $*.tab.c $*.cpp
-	$(VERB) cmp $*.tab.h $*.h > /dev/null || ${MV} -f $*.tab.h $*.h
+	$(VERB) cmp -s $*.tab.c $*.cpp > /dev/null || ${MV} -f $*.tab.c $*.cpp
+	$(VERB) cmp -s $*.tab.h $*.h   > /dev/null || ${MV} -f $*.tab.h $*.h
 	@# If the files were not updated, don't leave them lying around...
 	@rm -f $*.tab.c $*.tab.h
 
@@ -762,12 +762,6 @@
 	$(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc
 	$(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT)
 
-distclean:: clean
-	$(VERB) (cd $(LLVM_SRC_ROOT); $(RM) -rf $(LEVEL)/Makefile.config \
-	            $(LEVEL)/include/Config/config.h \
-	            $(LEVEL)/autom4te.cache \
-	            $(LEVEL)/config.log)
-
 ###########################################################################
 # C/C++ Dependencies
 #	Define variables and rules that generate header file dependencies
@@ -795,7 +789,9 @@
 # are cleaning (this example taken from the GNU Make Manual).
 #
 ifneq ($(MAKECMDGOALS),clean)
+ifneq ($(MAKECMDGOALS),distclean)
 ifneq ($(SourceDepend),)
 -include $(SourceDepend)
+endif
 endif
 endif





More information about the llvm-commits mailing list