llvm.org GIT mirror llvm / a328f88
* Don't print out HOW we are running Flex unless in verbose mode. We already hide the bison command line. * If running flex or bison gives us the files we already have, don't overwrite the ones we have, which cause unnecessary compilation. I demand the ability to make meaningless changes without penalty! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7571 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 22 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
765765 # FIXME. (f.e. char Buffer[10000]; )
766766 #
767767 %.cpp: %.l
768 $(FLEX) -t $< | $(SED) '/^find_rule/d' | \
768 @echo Flex\'ing $<...
769 $(VERB) $(FLEX) -t $< | $(SED) '/^find_rule/d' | \
769770 $(SED) 's/void yyunput/inline void yyunput/' | \
770771 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
771 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@
772 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
773 > $@.tmp
774 $(VERB) diff -q $@ $@.tmp || ${MV} -f $@.tmp $@
775 @# remove the output of flex if it didn't get moved over...
776 @rm -f $@.tmp
772777
773778 # Rule for building the bison parsers...
774779 %.c: %.y # Cancel built-in rules for yacc
776781 %.cpp %.h : %.y
777782 @echo Bison\'ing $<...
778783 $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y
779 $(VERB) ${MV} -f $*.tab.c $*.cpp
780 $(VERB) ${MV} -f $*.tab.h $*.h
784 $(VERB) diff -q $*.tab.c $*.cpp || ${MV} -f $*.tab.c $*.cpp
785 $(VERB) diff -q $*.tab.h $*.h || ${MV} -f $*.tab.h $*.h
786 @# If the files were not updated, don't leave them lying around...
787 @rm -f $*.tab.c $*.tab.h
781788
782789 # To create the directories...
783790 %/.dir:
765765 # FIXME. (f.e. char Buffer[10000]; )
766766 #
767767 %.cpp: %.l
768 $(FLEX) -t $< | $(SED) '/^find_rule/d' | \
768 @echo Flex\'ing $<...
769 $(VERB) $(FLEX) -t $< | $(SED) '/^find_rule/d' | \
769770 $(SED) 's/void yyunput/inline void yyunput/' | \
770771 $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
771 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@
772 $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \
773 > $@.tmp
774 $(VERB) diff -q $@ $@.tmp || ${MV} -f $@.tmp $@
775 @# remove the output of flex if it didn't get moved over...
776 @rm -f $@.tmp
772777
773778 # Rule for building the bison parsers...
774779 %.c: %.y # Cancel built-in rules for yacc
776781 %.cpp %.h : %.y
777782 @echo Bison\'ing $<...
778783 $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y
779 $(VERB) ${MV} -f $*.tab.c $*.cpp
780 $(VERB) ${MV} -f $*.tab.h $*.h
784 $(VERB) diff -q $*.tab.c $*.cpp || ${MV} -f $*.tab.c $*.cpp
785 $(VERB) diff -q $*.tab.h $*.h || ${MV} -f $*.tab.h $*.h
786 @# If the files were not updated, don't leave them lying around...
787 @rm -f $*.tab.c $*.tab.h
781788
782789 # To create the directories...
783790 %/.dir: