[Mesa-dev] [PATCH 06/29] rbug: consolidate C sources list into Makefile.sources

Emil Velikov emil.l.velikov at gmail.com
Sun Sep 22 13:29:29 PDT 2013


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/drivers/rbug/Makefile.am      | 7 ++-----
 src/gallium/drivers/rbug/Makefile.sources | 5 +++++
 src/gallium/drivers/rbug/SConscript       | 8 ++------
 3 files changed, 9 insertions(+), 11 deletions(-)
 create mode 100644 src/gallium/drivers/rbug/Makefile.sources

diff --git a/src/gallium/drivers/rbug/Makefile.am b/src/gallium/drivers/rbug/Makefile.am
index 3c1a8b5..1aa6521 100644
--- a/src/gallium/drivers/rbug/Makefile.am
+++ b/src/gallium/drivers/rbug/Makefile.am
@@ -20,6 +20,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 noinst_LTLIBRARIES = librbug.la
@@ -34,8 +35,4 @@ AM_CFLAGS = \
 	-I$(top_srcdir)/src/gallium/drivers \
 	-I$(top_srcdir)/include
 
-librbug_la_SOURCES = \
-	rbug_core.c \
-	rbug_context.c \
-	rbug_objects.c \
-	rbug_screen.c
+librbug_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/drivers/rbug/Makefile.sources b/src/gallium/drivers/rbug/Makefile.sources
new file mode 100644
index 0000000..32a18f6
--- /dev/null
+++ b/src/gallium/drivers/rbug/Makefile.sources
@@ -0,0 +1,5 @@
+C_SOURCES := \
+	rbug_core.c \
+	rbug_context.c \
+	rbug_objects.c \
+	rbug_screen.c
diff --git a/src/gallium/drivers/rbug/SConscript b/src/gallium/drivers/rbug/SConscript
index 169c271..63209ab 100644
--- a/src/gallium/drivers/rbug/SConscript
+++ b/src/gallium/drivers/rbug/SConscript
@@ -4,12 +4,8 @@ env = env.Clone()
 
 rbug = env.ConvenienceLibrary(
 	target = 'rbug',
-	source = [
-		'rbug_context.c',
-		'rbug_core.c',
-		'rbug_objects.c',
-		'rbug_screen.c',
-	])
+	source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
+	)
 
 env.Alias('rbug', rbug)
 
-- 
1.8.4



More information about the mesa-dev mailing list