Move include files in debian packge into 'senf' subdirectory
[senf.git] / SConstruct
index 13e6954..ed68a67 100644 (file)
@@ -74,7 +74,7 @@ if not logname:
     logname = pwd.getpwuid(os.getuid()).pw_name
 
 env.Append(
-   CPPPATH = [ '#' ],
+   CPPPATH = [ ],
    LIBS = [ 'iberty', '$BOOSTREGEXLIB' ],
    DOXY_XREF_TYPES = [ 'bug', 'fixme', 'todo', 'idea' ],
    DOXY_HTML_XSL = '#/doclib/html-munge.xsl',
@@ -94,6 +94,16 @@ Export('env')
 if not env.GetOption('clean') and not os.path.exists("Doxyfile.local"):
     Execute(Touch("Doxyfile.local"))
 
+# Create config.h
+file("config.h","w").write(
+"""#ifndef H_config_
+#define H_config_ 1
+// This looks stupid. However, we need this since the debian packaged Version
+// of SENF is installed in a 'senf' subdirectory which the source Version is not
+#define SENF_ABSOLUTE_INCLUDE_PATH(senf_relative_include_file_path) <%s/senf_relative_include_file_path>
+#endif
+""" % env.Dir('#').abspath)
+
 ###########################################################################
 # Define build targets
 
@@ -131,3 +141,5 @@ env.Clean('all', [ os.path.join(path,f)
                    for path, subdirs, files in os.walk('.')
                    for pattern in env['CLEAN_PATTERNS']
                    for f in fnmatch.filter(files,pattern) ])
+
+env.Clean('all', 'config.h')