[llvm-commits] CVS: llvm/test/Programs/MultiSource/Burg/Makefile
John Criswell
criswell at cs.uiuc.edu
Sat Sep 6 10:16:44 PDT 2003
Changes in directory llvm/test/Programs/MultiSource/Burg:
Makefile updated: 1.6 -> 1.7
---
Log message:
Checkin of autoconf-style object root.
Adjusted the Makefile rules to handle building outside the source directory.
---
Diffs of the changes:
Index: llvm/test/Programs/MultiSource/Burg/Makefile
diff -u llvm/test/Programs/MultiSource/Burg/Makefile:1.6 llvm/test/Programs/MultiSource/Burg/Makefile:1.7
--- llvm/test/Programs/MultiSource/Burg/Makefile:1.6 Fri Aug 22 12:15:18 2003
+++ llvm/test/Programs/MultiSource/Burg/Makefile Sat Sep 6 10:13:12 2003
@@ -1,34 +1,34 @@
LEVEL = ../../../..
+include $(LEVEL)/Makefile.config
+
PROG = burg
-CPPFLAGS = -DDEBUG
+CPPFLAGS = -DDEBUG
LDFLAGS =
ExtraSource := y.tab.c
-STDIN_FILENAME = sample.gr
-
-Source := $(ExtraSource) $(wildcard *.c)
+STDIN_FILENAME = $(BUILD_SRC_DIR)/sample.gr
-## $(BUILD_OBJ_ROOT)/Depend/y.tab.d:: y.tab.c $(BUILD_OBJ_ROOT)/Depend/.dir
+include $(LEVEL)/Makefile.config
-%.cpp %.h : %.y
- yacc -d $<
- $(VERB) cp -p y.tab.c $(basename $@).cpp
- $(VERB) cp -p y.tab.h $(basename $@).h
-
-## $(VERB) mv -f $(basename $@).tab.c $(basename $@).cpp
-## $(VERB) mv -f $(basename $@).tab.h $(basename $@).h
+Source := $(ExtraSource) $(wildcard $(BUILD_SRC_DIR)/*.c)
include ../Makefile.multisrc
-y.tab.c y.tab.h: gram.y
+#
+# JTC -
+# This is stupid. I bet we'll yacc twice because of this, but for now it
+# seems to work. Ideally, these yacc rules should be in a master rule
+# file for the test suite, separate from the LLVM build rules.
+#
+y.tab.h:: $(SourceDir)/gram.y
yacc -d $<
-lex.c: y.tab.h
-Source := $(patsubst gram.%,,$(Source))
+y.tab.c: $(SourceDir)/gram.y
+ yacc -d $<
-## $(BUILD_OBJ_ROOT)/Depend/gram.d: gram.y
+$(SourceDir)/lex.c: y.tab.h
src:
echo Sources = $(Source)
More information about the llvm-commits
mailing list