move config to a subdir

This pattern is used in other places, e.g.,
https://github.com/openbmc/phosphor-logging

In this way, we can cleanly add the bmcweb_config.h into include
directory. Otherwise, any subdir we have in this project will need to
include the root.

Tested: it builds.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I882e51f3acb256a881c9474f6e4d4e19fea4a413
diff --git a/bmcweb.service.in b/config/bmcweb.service.in
similarity index 100%
rename from bmcweb.service.in
rename to config/bmcweb.service.in
diff --git a/bmcweb.socket.in b/config/bmcweb.socket.in
similarity index 100%
rename from bmcweb.socket.in
rename to config/bmcweb.socket.in
diff --git a/bmcweb_config.h.in b/config/bmcweb_config.h.in
similarity index 100%
rename from bmcweb_config.h.in
rename to config/bmcweb_config.h.in
diff --git a/config/meson.build b/config/meson.build
new file mode 100644
index 0000000..f42656b
--- /dev/null
+++ b/config/meson.build
@@ -0,0 +1,44 @@
+# Gather the Configuration data
+
+conf_data = configuration_data()
+conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
+xss_enabled = get_option('insecure-disable-xss')
+conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
+enable_redfish_query = get_option('insecure-enable-redfish-query')
+conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
+# enable_redfish_aggregation = get_option('redfish-aggregation')
+# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled())
+insecure_push_style_notification = get_option('insecure-push-style-notification')
+conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
+conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
+conf_data.set('HTTPS_PORT', get_option('https_port'))
+
+conf_h_dep = declare_dependency(
+    include_directories: include_directories('.'),
+    sources: configure_file(
+        input: 'bmcweb_config.h.in',
+        output: 'bmcweb_config.h',
+        configuration: conf_data
+    )
+)
+
+# Configure and install systemd unit files
+
+configure_file(input : 'bmcweb.socket.in',
+               output : 'bmcweb.socket',
+               install_dir: systemd_system_unit_dir,
+               configuration: conf_data,
+               install : true)
+
+configure_file(input : 'bmcweb.service.in',
+               output : 'bmcweb.service',
+               install_dir: systemd_system_unit_dir,
+               configuration: conf_data,
+               install : true)
+
+# Copy pam-webserver to etc/pam.d
+configure_file(input : 'pam-webserver',
+               output : 'webserver',
+               copy : true,
+               install_dir: '/etc/pam.d',
+               install : true)
\ No newline at end of file
diff --git a/pam-webserver b/config/pam-webserver
similarity index 100%
rename from pam-webserver
rename to config/pam-webserver
diff --git a/meson.build b/meson.build
index 7e58791..1024761 100644
--- a/meson.build
+++ b/meson.build
@@ -316,26 +316,6 @@
   gmock = gmock.as_system('system')
 endif
 
-# Gather the Configuration data
-
-conf_data = configuration_data()
-conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
-xss_enabled = get_option('insecure-disable-xss')
-conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
-enable_redfish_query = get_option('insecure-enable-redfish-query')
-conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
-# enable_redfish_aggregation = get_option('redfish-aggregation')
-# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled())
-insecure_push_style_notification = get_option('insecure-push-style-notification')
-conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
-conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
-conf_data.set('HTTPS_PORT', get_option('https_port'))
-configure_file(input: 'bmcweb_config.h.in',
-               output: 'bmcweb_config.h',
-               configuration: conf_data)
-
-# Configure and install systemd unit files
-
 systemd_system_unit_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
 
 bindir = get_option('prefix') + '/' +get_option('bindir')
@@ -346,27 +326,13 @@
           'systemd unit directory' : systemd_system_unit_dir
         }, section : 'Directories')
 
-configure_file(input : 'bmcweb.socket.in',
-               output : 'bmcweb.socket',
-               install_dir: systemd_system_unit_dir,
-               configuration: conf_data,
-               install : true)
-
-configure_file(input : 'bmcweb.service.in',
-               output : 'bmcweb.service',
-               install_dir: systemd_system_unit_dir,
-               configuration: conf_data,
-               install : true)
-
-# Copy pam-webserver to etc/pam.d
-configure_file(input : 'pam-webserver',
-               output : 'webserver',
-               copy : true,
-               install_dir: '/etc/pam.d',
-               install : true)
-
 install_subdir('static', install_dir : 'share/www', strip_directory : true)
 
+# Config subdirectory
+
+subdir('config')
+bmcweb_dependencies += conf_h_dep
+
 # Source files
 
 srcfiles_bmcweb = [