diff options
author | Thomas Haller <thaller@redhat.com> | 2017-02-15 18:02:52 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-15 18:36:24 +0100 |
commit | 4de6f603e3631975039476f752da7b8d6331019d (patch) | |
tree | 022636231bd450502c3d32a25bfa62a39568c078 | |
parent | 0cad8307a5beaf1f2d01837687588e59d23c5884 (diff) | |
download | NetworkManager-4de6f603e3631975039476f752da7b8d6331019d.tar.gz |
build: use `sed` instead of AC_SUBST() to generate man/common.ent
Otherwise, substitions are not properly expanded.
For example
- "AC_SUBST(nmrundir, '${runstatedir}'/$PACKAGE, [NetworkManager runtime state directory])"
gives ${runstatedir}/NetworkManager/resolv.conf
- "AC_SUBST(nmrundir, "${runstatedir}/$PACKAGE", [NetworkManager runtime state directory])"
gives ${prefix}/var/run/NetworkManager/resolv.conf
-rw-r--r-- | Makefile.am | 12 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | man/common.ent.in | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 2c0c5661d7..1b92f3ae2f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3282,12 +3282,19 @@ endif ############################################################################### data_edit = sed \ + -e 's|@NM_VERSION[@]|$(NM_VERSION)|g' \ -e 's|@bindir[@]|$(bindir)|g' \ -e 's|@sbindir[@]|$(sbindir)|g' \ -e 's|@sysconfdir[@]|$(sysconfdir)|g' \ + -e 's|@nmrundir[@]|$(nmrundir)|g' \ -e 's|@localstatedir[@]|$(localstatedir)|g' \ -e 's|@libexecdir[@]|$(libexecdir)|g' \ - -e 's|@DISTRO_NETWORK_SERVICE[@]|$(DISTRO_NETWORK_SERVICE)|g' + -e 's|@DISTRO_NETWORK_SERVICE[@]|$(DISTRO_NETWORK_SERVICE)|g' \ + -e 's|@NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT[@]|$(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT)|g' \ + -e 's|@NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT)|g' \ + -e 's|@NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT[@]|$(NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT)|g' \ + -e 's|@NM_CONFIG_DEFAULT_MAIN_RC_MANAGER[@]|$(NM_CONFIG_DEFAULT_MAIN_RC_MANAGER)|g' \ + -e 's|@NM_CONFIG_DEFAULT_MAIN_DHCP[@]|$(NM_CONFIG_DEFAULT_MAIN_DHCP)|g' if HAVE_SYSTEMD @@ -3943,6 +3950,9 @@ endif # man ############################################################################### +man/common.ent: man/common.ent.in + $(AM_V_GEN) $(data_edit) $< >$@ + xsltproc_flags = \ --path man \ --xinclude \ diff --git a/configure.ac b/configure.ac index 611ef582ed..6e3ef7c06f 100644 --- a/configure.ac +++ b/configure.ac @@ -89,7 +89,6 @@ AC_SUBST(nmlibdir, '${prefix}'/lib/$PACKAGE, [NetworkManager library directory]) AC_SUBST(nmdatadir, '${datadir}'/$PACKAGE, [NetworkManager shared data directory]) AC_SUBST(nmstatedir, '${localstatedir}'/lib/$PACKAGE, [NetworkManager persistent state directory]) AC_SUBST(nmrundir, '${runstatedir}'/$PACKAGE, [NetworkManager runtime state directory]) -AC_SUBST(nmrundir_, "${runstatedir}/$PACKAGE", [NetworkManager runtime state directory (expanded)]) AC_GNU_SOURCE AC_CHECK_FUNCS([__secure_getenv secure_getenv]) @@ -1146,7 +1145,6 @@ libnm/libnm.pc libnm-util/libnm-util.pc libnm-glib/libnm-glib.pc libnm-glib/libnm-glib-vpn.pc -man/common.ent po/Makefile.in data/org.freedesktop.NetworkManager.policy.in docs/api/Makefile diff --git a/man/common.ent.in b/man/common.ent.in index b3a4bca8fe..ddfbb69a69 100644 --- a/man/common.ent.in +++ b/man/common.ent.in @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> <!ENTITY NM_VERSION "@NM_VERSION@"> <!ENTITY sysconfdir "@sysconfdir@"> -<!ENTITY nmrundir "@nmrundir_@"> +<!ENTITY nmrundir "@nmrundir@"> <!ENTITY NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT "@NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT@"> <!ENTITY NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT "@NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT@"> <!ENTITY NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT "@NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT@"> |