Add missing things to the distribution.
[oota-llvm.git] / utils / Burg / Makefile
index ae0a43ce7c65f833755451a2d6ec3fa55da6cab6..f40f3eb71d8128b218390236df18bd5e39c7fb50 100644 (file)
@@ -8,29 +8,34 @@
 ##===----------------------------------------------------------------------===##
 LEVEL = ../..
 TOOLNAME = burg
-ExtraSource = gram.tab.c
+BUILT_SOURCES = gram.tab.c gram.tab.h
+
+EXTRA_DIST = gram.yc gram.tab.c gram.tab.h sample.gr burg.shar.gz COPYRIGHT Doc
 
 include $(LEVEL)/Makefile.common
 
-gram.tab.c gram.tab.h:: gram.yc
-       $(VERB) $(BISON) -o gram.tab.c -d $<
+gram.tab.c gram.tab.h: gram.yc
+       $(Verb) $(BISON) -o gram.tab.c -d $<
 
-$(SourceDir)/lex.c: gram.tab.h
+$(ObjDir)/lex.o : gram.tab.h
 
 clean::
-       $(VERB) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp
-
-#$(BUILD_OBJ_DIR)/Release/lex.o $(BUILD_OBJ_DIR)/Profile/lex.o $(BUILD_OBJ_DIR)/Debug/lex.o: gram.tab.h
+       $(Verb) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp
 
 doc.dvi: doc.tex
-       $(VERB) latex doc; latex doc
-
-
-test:: $(TOOLEXENAME_G) sample.gr
-       $(TOOLEXENAME_G) -I     <sample.gr   >sample.c && $(CC) $(CFLAGS) -o sample sample.c && ./sample
-       $(TOOLEXENAME_G) -I      sample.gr   >tmp && cmp tmp sample.c
-       $(TOOLEXENAME_G) -I     <sample.gr -o tmp && cmp tmp sample.c
-       $(TOOLEXENAME_G) -I      sample.gr -o tmp && cmp tmp sample.c
-       $(TOOLEXENAME_G) -I -O0 <sample.gr   >tmp && cmp tmp sample.c
-       $(TOOLEXENAME_G) -I -=  <sample.gr   >tmp && cmp tmp sample.c
+       $(Verb) latex doc; latex doc
+
+check:: $(ToolBuildPath) $(BUILD_SRC_DIR)/sample.gr
+       $(ToolBuildPath) -I <$(BUILD_SRC_DIR)/sample.gr   >sample.c \
+         && $(CC) $(CFLAGS) -o sample sample.c && ./sample
+       $(ToolBuildPath) -I      $(BUILD_SRC_DIR)/sample.gr   >tmp \
+         && cmp tmp sample.c
+       $(ToolBuildPath) -I     <$(BUILD_SRC_DIR)/sample.gr -o tmp \
+         && cmp tmp sample.c
+       $(ToolBuildPath) -I      $(BUILD_SRC_DIR)/sample.gr -o tmp \
+         && cmp tmp sample.c
+       $(ToolBuildPath) -I -O0 <$(BUILD_SRC_DIR)/sample.gr   >tmp \
+         && cmp tmp sample.c
+       $(ToolBuildPath) -I -=  <$(BUILD_SRC_DIR)/sample.gr   >tmp \
+         && cmp tmp sample.c
        $(RM) -f tmp sample.c