[Lldb-commits] [lldb] r111868 - in /lldb/trunk/test: README-TestSuite array_types/Makefile class_types/Makefile dead-strip/Makefile function_types/Makefile global_variables/Makefile make/ make/Makefile.rules order/Makefile set_values/Makefile stl/Makefile struct_types/Makefile unsigned_types/Makefile
Johnny Chen
johnny.chen at apple.com
Mon Aug 23 16:56:08 PDT 2010
Author: johnny
Date: Mon Aug 23 18:56:08 2010
New Revision: 111868
URL: http://llvm.org/viewvc/llvm-project?rev=111868&view=rev
Log:
Makefile refactoring for the test suite. Added a make directory under test,
which hosts the Makefile.rules and modified most of the Makefiles under each
test case directories to utilize Mekefile.rules.
Added a description of 'make' directory into README-TestSuite file.
Added:
lldb/trunk/test/make/
lldb/trunk/test/make/Makefile.rules
Modified:
lldb/trunk/test/README-TestSuite
lldb/trunk/test/array_types/Makefile
lldb/trunk/test/class_types/Makefile
lldb/trunk/test/dead-strip/Makefile
lldb/trunk/test/function_types/Makefile
lldb/trunk/test/global_variables/Makefile
lldb/trunk/test/order/Makefile
lldb/trunk/test/set_values/Makefile
lldb/trunk/test/stl/Makefile
lldb/trunk/test/struct_types/Makefile
lldb/trunk/test/unsigned_types/Makefile
Modified: lldb/trunk/test/README-TestSuite
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/README-TestSuite?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/README-TestSuite (original)
+++ lldb/trunk/test/README-TestSuite Mon Aug 23 18:56:08 2010
@@ -54,7 +54,12 @@
C/C++/ObjC source files; they were created to house the Python test case which
does not involve lldb reading in an executable file at all.
-o unittest2
+o make directory
+
+ Contains Makefile.rules, which can be utilized by test cases to write Makefile
+ based rules to build native binaries.
+
+o unittest2 directory
Many new features were added to unittest in Python 2.7, including test
discovery. unittest2 allows you to use these features with earlier versions of
Modified: lldb/trunk/test/array_types/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/array_types/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/array_types/Makefile (original)
+++ lldb/trunk/test/array_types/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,5 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+C_SOURCES := main.c
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/class_types/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/class_types/Makefile (original)
+++ lldb/trunk/test/class_types/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,5 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=
-CXX_SOURCES :=main.cpp
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+CXX_SOURCES := main.cpp
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/dead-strip/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dead-strip/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/dead-strip/Makefile (original)
+++ lldb/trunk/test/dead-strip/Makefile Mon Aug 23 18:56:08 2010
@@ -1,126 +1,7 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
+LEVEL = ../make
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
+C_SOURCES := main.c
LDFLAGS = $(CFLAGS) -Xlinker -dead_strip
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-# Don't make the dSYM so we can test DWARF with debug map...
-# $(DSYM) : $(EXE)
-# $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
-
+MAKE_DSYM := NO
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/function_types/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/function_types/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/function_types/Makefile (original)
+++ lldb/trunk/test/function_types/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,5 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+C_SOURCES := main.c
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/global_variables/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/global_variables/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/global_variables/Makefile (original)
+++ lldb/trunk/test/global_variables/Makefile Mon Aug 23 18:56:08 2010
@@ -1,142 +1,8 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# dylib settings
-#----------------------------------------------------------------------
-DYLIB_NAME=a
-DYLIB_BASENAME=lib$(DYLIB_NAME).dylib
-DYLIB_C_SOURCES :=a.c
-ifneq "$(strip $(DYLIB_C_SOURCES))" ""
- DYLIB_OBJECTS +=$(strip $(DYLIB_C_SOURCES:.c=.o))
-endif
-
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS) $(DYLIB_BASENAME)
- $(LD) $(LDFLAGS) $(OBJECTS) -L. -l$(DYLIB_NAME) -o "$(EXE)"
-
-#----------------------------------------------------------------------
-# Make the dylib
-#----------------------------------------------------------------------
-$(DYLIB_BASENAME) : $(DYLIB_OBJECTS)
- $(LD) $(LDFLAGS) $(DYLIB_OBJECTS) -install_name "@executable_path/$(DYLIB_BASENAME)" -dynamiclib -o "$(DYLIB_BASENAME)"
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS) $(DYLIB_OBJECTS) $(DYLIB_BASENAME) $(DYLIB_BASENAME).dSYM
+LEVEL = ../make
+C_SOURCES := main.c
+DYLIB_NAME := liba.dylib
+DYLIB_C_SOURCES := a.c
+include $(LEVEL)/Makefile.rules
Added: lldb/trunk/test/make/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=111868&view=auto
==============================================================================
--- lldb/trunk/test/make/Makefile.rules (added)
+++ lldb/trunk/test/make/Makefile.rules Mon Aug 23 18:56:08 2010
@@ -0,0 +1,147 @@
+#----------------------------------------------------------------------
+# Clients fill in the source files to build
+#----------------------------------------------------------------------
+# C_SOURCES := main.c
+# CXX_SOURCES :=
+# OBJC_SOURCES :=
+# OBJCXX_SOURCES :=
+# DYLIB_C_SOURCES :=
+
+# Uncomment line below for debugging shell commands
+# SHELL = /bin/sh -x
+
+#----------------------------------------------------------------------
+# Change any build/tool options needed
+#----------------------------------------------------------------------
+DS := /usr/bin/dsymutil
+DSFLAGS =
+CC = gcc
+CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
+CPLUSPLUSFLAGS +=$(CFLAGS)
+CPPFLAGS +=$(CFLAGS)
+LD = gcc
+LDFLAGS ?= $(CFLAGS)
+OBJECTS =
+EXE = a.out
+DSYM = $(EXE).dSYM
+
+#----------------------------------------------------------------------
+# dylib settings
+#----------------------------------------------------------------------
+ifneq "$(strip $(DYLIB_C_SOURCES))" ""
+ DYLIB_OBJECTS +=$(strip $(DYLIB_C_SOURCES:.c=.o))
+endif
+
+
+#----------------------------------------------------------------------
+# Check if we have any C source files
+#----------------------------------------------------------------------
+ifneq "$(strip $(C_SOURCES))" ""
+ OBJECTS +=$(strip $(C_SOURCES:.c=.o))
+endif
+
+#----------------------------------------------------------------------
+# Check if we have any C++ source files
+#----------------------------------------------------------------------
+ifneq "$(strip $(CXX_SOURCES))" ""
+ OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
+ LD = g++
+endif
+
+#----------------------------------------------------------------------
+# Check if we have any ObjC source files
+#----------------------------------------------------------------------
+ifneq "$(strip $(OBJC_SOURCES))" ""
+ OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
+ LDFLAGS +=-lobjc
+endif
+
+#----------------------------------------------------------------------
+# Check if we have any ObjC++ source files
+#----------------------------------------------------------------------
+ifneq "$(strip $(OBJCXX_SOURCES))" ""
+ OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
+ LD = g++
+ ifeq $(findstring lobjc,$(LDFLAGS)) ""
+ LDFLAGS +=-lobjc
+ endif
+endif
+
+
+#----------------------------------------------------------------------
+# Make the dSYM file from the executable if $(MAKE_DSYM) != "NO"
+#----------------------------------------------------------------------
+ifneq "$(MAKE_DSYM)" "NO"
+$(DSYM) : $(EXE)
+ $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
+endif
+
+#----------------------------------------------------------------------
+# Compile the executable from all the objects.
+#----------------------------------------------------------------------
+ifeq "$(DYLIB_NAME)" ""
+$(EXE) : $(OBJECTS)
+ $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
+else
+$(EXE) : $(OBJECTS) $(DYLIB_NAME)
+ $(LD) $(LDFLAGS) $(OBJECTS) -L. -l$(subst lib,,$(basename $(DYLIB_NAME))) -o "$(EXE)"
+endif
+
+#----------------------------------------------------------------------
+# Make the dylib
+#----------------------------------------------------------------------
+$(DYLIB_NAME) : $(DYLIB_OBJECTS)
+ $(LD) $(LDFLAGS) $(DYLIB_OBJECTS) -install_name "@executable_path/$(DYLIB_NAME)" -dynamiclib -o "$(DYLIB_NAME)"
+
+#----------------------------------------------------------------------
+# Automatic variables based on items already entered. Below we create
+# an objects lists from the list of sources by replacing all entries
+# that end with .c with .o, and we also create a list of prerequisite
+# files by replacing all .c files with .d.
+#----------------------------------------------------------------------
+PREREQS := $(OBJECTS:.o=.d)
+
+#----------------------------------------------------------------------
+# Rule for Generating Prerequisites Automatically using .d files and
+# the compiler -MM option. The -M option will list all system headers,
+# and the -MM option will list all non-system dependencies.
+#----------------------------------------------------------------------
+%.d: %.c
+ @set -e; rm -f $@; \
+ $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+%.d: %.cpp
+ @set -e; rm -f $@; \
+ $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+%.d: %.m
+ @set -e; rm -f $@; \
+ $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+%.d: %.mm
+ @set -e; rm -f $@; \
+ $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+#----------------------------------------------------------------------
+# Include all of the makefiles for each source file so we don't have
+# to manually track all of the prerequisites for each source file.
+#----------------------------------------------------------------------
+sinclude $(PREREQS)
+
+.PHONY: clean
+dsym: $(DSYM)
+all: $(EXE) $(DSYM)
+clean:
+ifeq "$(DYLIB_NAME)" ""
+ rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
+else
+ rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS) $(DYLIB_OBJECTS) $(DYLIB_NAME) $(DYLIB_NAME).dSYM
+endif
Modified: lldb/trunk/test/order/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/order/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/order/Makefile (original)
+++ lldb/trunk/test/order/Makefile Mon Aug 23 18:56:08 2010
@@ -1,127 +1,7 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
+LEVEL = ../make
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
+C_SOURCES := main.c
LDFLAGS = $(CFLAGS) -Xlinker -order_file ./order-file
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-# Don't make the dSYM so we can test the DWARF with debug map with
-# order files
-#$(DSYM) : $(EXE)
-# $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
-
+MAKE_DSYM := NO
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/set_values/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/set_values/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/set_values/Makefile (original)
+++ lldb/trunk/test/set_values/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,5 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+C_SOURCES := main.c
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/stl/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/stl/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/stl/Makefile (original)
+++ lldb/trunk/test/stl/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,6 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=
-CXX_SOURCES :=main.cpp
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -Os
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+CXX_SOURCES := main.cpp
+CFLAGS :=-arch x86_64 -gdwarf-2 -Os
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/struct_types/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/struct_types/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/struct_types/Makefile (original)
+++ lldb/trunk/test/struct_types/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,5 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=main.c
-CXX_SOURCES :=
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+C_SOURCES := main.c
+include $(LEVEL)/Makefile.rules
Modified: lldb/trunk/test/unsigned_types/Makefile
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/unsigned_types/Makefile?rev=111868&r1=111867&r2=111868&view=diff
==============================================================================
--- lldb/trunk/test/unsigned_types/Makefile (original)
+++ lldb/trunk/test/unsigned_types/Makefile Mon Aug 23 18:56:08 2010
@@ -1,125 +1,5 @@
-#----------------------------------------------------------------------
-# Fill in the source files to build
-#----------------------------------------------------------------------
-C_SOURCES :=
-CXX_SOURCES :=main.cpp
-OBJC_SOURCES :=
-OBJCXX_SOURCES :=
-
-# Uncomment line below for debugging shell commands
-# SHELL = /bin/sh -x
-
-#----------------------------------------------------------------------
-# Change any build/tool options needed
-#----------------------------------------------------------------------
-DS := /usr/bin/dsymutil
-DSFLAGS =
-CFLAGS ?=-arch x86_64 -gdwarf-2 -O0
-CPLUSPLUSFLAGS +=$(CFLAGS)
-CPPFLAGS +=$(CFLAGS)
-LD = gcc
-LDFLAGS = $(CFLAGS)
-OBJECTS =
-EXE=a.out
-DSYM=$(EXE).dSYM
-
-#----------------------------------------------------------------------
-# Check if we have any C source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(C_SOURCES))" ""
- OBJECTS +=$(strip $(C_SOURCES:.c=.o))
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any C++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(CXX_SOURCES))" ""
- OBJECTS +=$(strip $(CXX_SOURCES:.cpp=.o))
- LD = g++
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJC_SOURCES))" ""
- OBJECTS +=$(strip $(OBJC_SOURCES:.m=.o))
- LDFLAGS +=-lobjc
-endif
-
-#----------------------------------------------------------------------
-# Check if we have any ObjC++ source files
-#----------------------------------------------------------------------
-ifneq "$(strip $(OBJCXX_SOURCES))" ""
- OBJECTS +=$(strip $(OBJCXX_SOURCES:.mm=.o))
- LD = g++
- ifeq $(findstring lobjc,$(LDFLAGS)) ""
- LDFLAGS +=-lobjc
- endif
-endif
-
-
-#----------------------------------------------------------------------
-# Make the dSYM file from the executable
-#----------------------------------------------------------------------
-$(DSYM) : $(EXE)
- $(DS) $(DSFLAGS) -o "$(DSYM)" "$(EXE)"
-
-#----------------------------------------------------------------------
-# Compile the executable from all the objects (default rule) with no
-# dsym file.
-#----------------------------------------------------------------------
-$(EXE) : $(OBJECTS)
- $(LD) $(LDFLAGS) $(OBJECTS) -o "$(EXE)"
-
-
-#----------------------------------------------------------------------
-# Automatic variables based on items already entered. Below we create
-# an objects lists from the list of sources by replacing all entries
-# that end with .c with .o, and we also create a list of prerequisite
-# files by replacing all .c files with .d.
-#----------------------------------------------------------------------
-PREREQS := $(OBJECTS:.o=.d)
-
-#----------------------------------------------------------------------
-# Rule for Generating Prerequisites Automatically using .d files and
-# the compiler -MM option. The -M option will list all system headers,
-# and the -MM option will list all non-system dependencies.
-#----------------------------------------------------------------------
-%.d: %.c
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.cpp
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.m
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-%.d: %.mm
- @set -e; rm -f $@; \
- $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \
- sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
- rm -f $@.$$$$
-
-#----------------------------------------------------------------------
-# Include all of the makefiles for each source file so we don't have
-# to manually track all of the prerequisites for each source file.
-#----------------------------------------------------------------------
-sinclude $(PREREQS)
-
-.PHONY: clean
-dsym: $(DSYM)
-all: $(EXE) $(DSYM)
-clean:
- rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS)
-
+LEVEL = ../make
+CXX_SOURCES := main.cpp
+include $(LEVEL)/Makefile.rules
More information about the lldb-commits
mailing list