build: fixed cflags for test_header
authorAndrew Tridgell <tridge@samba.org>
Thu, 3 Mar 2011 07:06:00 +0000 (18:06 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 15 Mar 2011 01:22:20 +0000 (12:22 +1100)
when using system libraries, we need the right cflags

testsuite/headers/wscript_build

index 4d383a1..b2b88fe 100644 (file)
@@ -23,11 +23,18 @@ bld.SAMBA_GENERATOR('test_headers.h',
                     source=public_headers,
                     target='test_headers.h')
 
+cflags=''
+for lib in ['talloc', 'tevent', 'tdb', 'ldb' ]:
+    ename = 'CPPPATH_%s' % lib.upper()
+    for p in bld.env[ename]:
+        cflags += bld.env.CPPPATH_ST % p + ' '
+
 if bld.env.DEVELOPER_MODE:
     bld.SAMBA_BINARY('test_headers',
                      source='test_headers.c',
                      includes="#include/public",
                      pyembed=True,
+                     cflags=cflags,
                      local_include=True,
                      global_include=False,
                      use_global_deps=False,