llvm.org GIT mirror llvm / d741bcf
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7780 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 16 years ago
3 changed file(s) with 18 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
55
66 test :: all
77 cd test; $(MAKE)
8
9 distclean:: clean
10 $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \
11 $(LEVEL)/include/Config/config.h \
12 $(LEVEL)/autoconf/autom4te.cache \
13 $(LEVEL)/config.log \
14 $(LEVEL)/TAGS
15
726726 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
727727 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
728728 > $@.tmp
729 $(VERB) cmp $@ $@.tmp > /dev/null || ${MV} -f $@.tmp $@
729 $(VERB) cmp -s $@ $@.tmp > /dev/null || ${MV} -f $@.tmp $@
730730 @# remove the output of flex if it didn't get moved over...
731731 @rm -f $@.tmp
732732
736736 %.cpp %.h : %.y
737737 @echo Bison\'ing $<...
738738 $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y
739 $(VERB) cmp $*.tab.c $*.cpp > /dev/null || ${MV} -f $*.tab.c $*.cpp
740 $(VERB) cmp $*.tab.h $*.h > /dev/null || ${MV} -f $*.tab.h $*.h
739 $(VERB) cmp -s $*.tab.c $*.cpp > /dev/null || ${MV} -f $*.tab.c $*.cpp
740 $(VERB) cmp -s $*.tab.h $*.h > /dev/null || ${MV} -f $*.tab.h $*.h
741741 @# If the files were not updated, don't leave them lying around...
742742 @rm -f $*.tab.c $*.tab.h
743743
761761 $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc
762762 $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT)
763763
764 distclean:: clean
765 $(VERB) (cd $(LLVM_SRC_ROOT); $(RM) -rf $(LEVEL)/Makefile.config \
766 $(LEVEL)/include/Config/config.h \
767 $(LEVEL)/autom4te.cache \
768 $(LEVEL)/config.log)
769
770764 ###########################################################################
771765 # C/C++ Dependencies
772766 # Define variables and rules that generate header file dependencies
794788 # are cleaning (this example taken from the GNU Make Manual).
795789 #
796790 ifneq ($(MAKECMDGOALS),clean)
791 ifneq ($(MAKECMDGOALS),distclean)
797792 ifneq ($(SourceDepend),)
798793 -include $(SourceDepend)
799794 endif
800795 endif
796 endif
726726 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
727727 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
728728 > $@.tmp
729 $(VERB) cmp $@ $@.tmp > /dev/null || ${MV} -f $@.tmp $@
729 $(VERB) cmp -s $@ $@.tmp > /dev/null || ${MV} -f $@.tmp $@
730730 @# remove the output of flex if it didn't get moved over...
731731 @rm -f $@.tmp
732732
736736 %.cpp %.h : %.y
737737 @echo Bison\'ing $<...
738738 $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y
739 $(VERB) cmp $*.tab.c $*.cpp > /dev/null || ${MV} -f $*.tab.c $*.cpp
740 $(VERB) cmp $*.tab.h $*.h > /dev/null || ${MV} -f $*.tab.h $*.h
739 $(VERB) cmp -s $*.tab.c $*.cpp > /dev/null || ${MV} -f $*.tab.c $*.cpp
740 $(VERB) cmp -s $*.tab.h $*.h > /dev/null || ${MV} -f $*.tab.h $*.h
741741 @# If the files were not updated, don't leave them lying around...
742742 @rm -f $*.tab.c $*.tab.h
743743
761761 $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc
762762 $(VERB) $(RM) -f $(LEX_OUTPUT) $(YACC_OUTPUT)
763763
764 distclean:: clean
765 $(VERB) (cd $(LLVM_SRC_ROOT); $(RM) -rf $(LEVEL)/Makefile.config \
766 $(LEVEL)/include/Config/config.h \
767 $(LEVEL)/autom4te.cache \
768 $(LEVEL)/config.log)
769
770764 ###########################################################################
771765 # C/C++ Dependencies
772766 # Define variables and rules that generate header file dependencies
794788 # are cleaning (this example taken from the GNU Make Manual).
795789 #
796790 ifneq ($(MAKECMDGOALS),clean)
791 ifneq ($(MAKECMDGOALS),distclean)
797792 ifneq ($(SourceDepend),)
798793 -include $(SourceDepend)
799794 endif
800795 endif
796 endif