build: substitute config directory in Makefile
authorLubomir Rintel <lkundrak@v3.sk>
Fri, 27 Nov 2015 13:10:01 +0000 (14:10 +0100)
committerLubomir Rintel <lkundrak@v3.sk>
Fri, 27 Nov 2015 13:18:34 +0000 (14:18 +0100)
The autoconf substitutions should be expanded in Makefiles and shell scripts
only, does not work well in XML.

Fixes: 3e0b590e107add3ab1d1ac23e473fcf0c5fe32b1

configure.ac
man/Makefile.am

index 3d28b14..c028f32 100644 (file)
@@ -1071,7 +1071,6 @@ initscript/linexa/networkmanager
 introspection/Makefile
 introspection/all.xml
 man/Makefile
-man/NetworkManager.conf.xml
 man/nm-system-settings.conf.5
 man/nm-online.1
 man/nmcli.1
index e7262e7..7caefd5 100644 (file)
@@ -25,6 +25,15 @@ if ENABLE_GTK_DOC
 
 endif
 
+CLEANFILES += NetworkManager.conf.xml
+NetworkManager.conf.xml: $(srcdir)/NetworkManager.conf.xml.in
+        $(AM_V_GEN)  sed \
+               -e 's|[@]NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT[@]|$(NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT)|g' \
+               -e 's|[@]NM_CONFIG_KEYFILE_PATH_DEFAULT[@]|$(nmconfdir)/conf.d|g' \
+               -e 's|[@]NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT[@]|$(NM_CONFIG_LOGGING_BACKEND_DEFAULT_TEXT)|g' \
+               -e 's|[@]NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT)|g' \
+               $< >$@
+
 if BUILD_SETTING_DOCS
 
 nm-settings.xml: nm-settings.xsl $(top_builddir)/libnm/nm-setting-docs.xml
@@ -109,4 +118,3 @@ man_MANS +=                                 \
        $(docbook_autogenerated_man_pages)
 endif
 endif
-