[virt-tools-list] [vhostmd 1/2] Modernize build files

Jim Fehlig jfehlig at suse.com
Wed Jun 6 19:46:54 UTC 2018


Some of the constructs used in the configure script and Makefiles
are a bit outdated, e.g. use of '$(mkinstalldirs)' instead of
'$(MKDIR_P)'. Change these old constructs to their modern counterparts.

Signed-off-by: Jim Fehlig <jfehlig at suse.com>
---
 Makefile.am  | 15 +++++++--------
 configure.ac |  2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e11963a..8234d98 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,11 +8,10 @@ EXTRA_DIST = $(doc_DATA) vhostmd.init vhostmd.spec autogen.sh
 AUTOMAKE_OPTIONS=dist-bzip2
 
 install-data-local:
-	$(mkinstalldirs) $(DESTDIR)/etc/vhostmd
-	$(mkinstalldirs) $(DESTDIR)/etc/init.d
-	$(mkinstalldirs) $(DESTDIR)/usr/sbin
-	- at INSTALL@ -m 0644 $(srcdir)/vhostmd.xml $(DESTDIR)/etc/vhostmd/vhostmd.conf
-	- at INSTALL@ -m 0644 $(srcdir)/vhostmd.dtd $(DESTDIR)/etc/vhostmd
-	- at INSTALL@ -m 0644 $(srcdir)/metric.dtd $(DESTDIR)/etc/vhostmd
-	- at INSTALL@ -m 0755 $(srcdir)/vhostmd.init $(DESTDIR)/etc/init.d/vhostmd
-
+	$(MKDIR_P) $(DESTDIR)/etc/vhostmd
+	$(MKDIR_P) $(DESTDIR)/etc/init.d
+	$(MKDIR_P) $(DESTDIR)/usr/sbin
+	$(INSTALL_DATA) $(srcdir)/vhostmd.xml $(DESTDIR)/etc/vhostmd/vhostmd.conf
+	$(INSTALL_DATA) $(srcdir)/vhostmd.dtd $(DESTDIR)/etc/vhostmd
+	$(INSTALL_DATA) $(srcdir)/metric.dtd $(DESTDIR)/etc/vhostmd
+	$(INSTALL_SCRIPT) $(srcdir)/vhostmd.init $(DESTDIR)/etc/init.d/vhostmd
diff --git a/configure.ac b/configure.ac
index fb4309b..27c8488 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,6 +4,7 @@ AC_CONFIG_SRCDIR(vhostmd/vhostmd.c)
 AC_CONFIG_HEADERS([config.h])
 
 AC_GNU_SOURCE
+AM_INIT_AUTOMAKE
 
 AC_PROG_LIBTOOL
 
@@ -21,7 +22,6 @@ AC_SUBST(topdir)
 
 AC_CONFIG_FILES([Makefile])
 
-AM_INIT_AUTOMAKE
 
 # Checks for programs.
 AM_PROG_CC_C_O
-- 
2.16.3




More information about the virt-tools-list mailing list