From 715a3efac28affe20e4bf6990f23f279af803ada Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Thu, 18 Feb 2010 20:35:51 +0000
Subject: [PATCH] Makefile.am: Use a separate build rule for each man page to
 avoid compatibility problems with BSD make.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@3069 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 smartmontools/CHANGELOG   |  3 +++
 smartmontools/Makefile.am | 18 +++++++++---------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG
index 289bd136b..630bcd314 100644
--- a/smartmontools/CHANGELOG
+++ b/smartmontools/CHANGELOG
@@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] Makefile.am: Use a separate build rule for each man page to
+       avoid compatibility problems with BSD make.
+
   [AS] drivedb.h updates:
        - Fujitsu MHZ2 BK series
 
diff --git a/smartmontools/Makefile.am b/smartmontools/Makefile.am
index ed3667a00..a832cc813 100644
--- a/smartmontools/Makefile.am
+++ b/smartmontools/Makefile.am
@@ -444,15 +444,15 @@ MAN_FILTER = \
     $(MAN_SAVESTATES) | \
     $(MAN_ATTRIBUTELOG)
 
-if OS_FREEBSD
-.for file in $(man_MANS)
-${file}: $(srcdir)/${file}.in Makefile svnversion.h
-	cat ${.ALLSRC:M*.in} | $(MAN_FILTER) > $@
-.endfor
-else
-smart%: $(srcdir)/smart%.in Makefile svnversion.h
-	cat $< | $(MAN_FILTER) > $@
-endif
+# Implicit rule 'smart%: smart%.in ...' does not work with BSD make
+smartctl.8: smartctl.8.in Makefile svnversion.h
+	cat $(srcdir)/smartctl.8.in | $(MAN_FILTER) > $@
+
+smartd.8: smartd.8.in Makefile svnversion.h
+	cat $(srcdir)/smartd.8.in | $(MAN_FILTER) > $@
+
+smartd.conf.5: smartd.conf.5.in Makefile svnversion.h
+	cat $(srcdir)/smartd.conf.5.in | $(MAN_FILTER) > $@
 
 # Commands to convert man pages into .html and .txt
 # TODO: configure
-- 
GitLab