From d720014c2cf7ff00004b64ca9cf817ffc00e6ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 10 Jun 2016 15:00:03 +0200 Subject: [PATCH 1/5] Build: Makefile.common to define MAINTAINERCLEANFILES + AM_CPPFLAGS Fallout after 89fba95. --- attrd/Makefile.am | 5 +---- lib/cib/Makefile.am | 5 +---- lib/cluster/Makefile.am | 5 +---- lib/common/Makefile.am | 8 +++----- lib/fencing/Makefile.am | 6 +----- lib/lrmd/Makefile.am | 8 +------- lib/pengine/Makefile.am | 5 +---- lib/transition/Makefile.am | 5 +---- lrmd/Makefile.am | 1 - 9 files changed, 10 insertions(+), 38 deletions(-) diff --git a/attrd/Makefile.am b/attrd/Makefile.am index 9d5e223..0c5d456 100644 --- a/attrd/Makefile.am +++ b/attrd/Makefile.am @@ -15,10 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl +include $(top_srcdir)/Makefile.common halibdir = $(CRM_DAEMON_DIR) halib_PROGRAMS = attrd diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am index 1ebd7b0..687b9f3 100644 --- a/lib/cib/Makefile.am +++ b/lib/cib/Makefile.am @@ -15,10 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl +include $(top_srcdir)/Makefile.common ## libraries lib_LTLIBRARIES = libcib.la diff --git a/lib/cluster/Makefile.am b/lib/cluster/Makefile.am index 5b6f3f7..f5f40bc 100644 --- a/lib/cluster/Makefile.am +++ b/lib/cluster/Makefile.am @@ -15,10 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl +include $(top_srcdir)/Makefile.common headerdir=$(pkgincludedir)/crm/cluster diff --git a/lib/common/Makefile.am b/lib/common/Makefile.am index 8ef08db..7ae1dc8 100644 --- a/lib/common/Makefile.am +++ b/lib/common/Makefile.am @@ -15,12 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in +include $(top_srcdir)/Makefile.common -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \ - -I$(top_builddir)/lib/gnu -I$(top_srcdir)/lib/gnu \ - -DSBINDIR=\"$(sbindir)\" +AM_CPPFLAGS += -I$(top_builddir)/lib/gnu -I$(top_srcdir)/lib/gnu \ + -DSBINDIR=\"$(sbindir)\" ## libraries lib_LTLIBRARIES = libcrmcommon.la diff --git a/lib/fencing/Makefile.am b/lib/fencing/Makefile.am index 3320466..aa57ba5 100644 --- a/lib/fencing/Makefile.am +++ b/lib/fencing/Makefile.am @@ -16,11 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \ - -I$(top_builddir) -I$(top_srcdir) +include $(top_srcdir)/Makefile.common lib_LTLIBRARIES = libstonithd.la diff --git a/lib/lrmd/Makefile.am b/lib/lrmd/Makefile.am index d5ae2f4..8c76a78 100644 --- a/lib/lrmd/Makefile.am +++ b/lib/lrmd/Makefile.am @@ -14,13 +14,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# - -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl \ - -I$(top_builddir) -I$(top_srcdir) +include $(top_srcdir)/Makefile.common lib_LTLIBRARIES = liblrmd.la diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index b9191d5..4544377 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -15,10 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl +include $(top_srcdir)/Makefile.common ## libraries lib_LTLIBRARIES = libpe_rules.la libpe_status.la diff --git a/lib/transition/Makefile.am b/lib/transition/Makefile.am index 4447f1b..6cc9bca 100644 --- a/lib/transition/Makefile.am +++ b/lib/transition/Makefile.am @@ -15,10 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -MAINTAINERCLEANFILES = Makefile.in - -AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/libltdl -I$(top_srcdir)/libltdl +include $(top_srcdir)/Makefile.common ## libraries lib_LTLIBRARIES = libtransitioner.la diff --git a/lrmd/Makefile.am b/lrmd/Makefile.am index a8fb07a..556d48a 100644 --- a/lrmd/Makefile.am +++ b/lrmd/Makefile.am @@ -14,7 +14,6 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # - include $(top_srcdir)/Makefile.common testdir = $(datadir)/$(PACKAGE)/tests/lrmd -- 1.8.3.1 From bfad92c9e23f3bf7a73e86017eed46ba7fd63c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 10 Jun 2016 17:38:46 +0200 Subject: [PATCH 2/5] Build: Makefile.am files: drop extraneous variables + targets - empty variables - non-fitting .PHONY definitions - unemployed install-exec-local + uninstall-local target pairs (per file) - AM_CFLAGS unnecessarily initialized with current AM_CPPFLAGS value - empty header_HEADERS variable + superfluous headerdir definition --- Makefile.am | 2 -- attrd/Makefile.am | 8 -------- fencing/Makefile.am | 2 -- include/crm/Makefile.am | 1 - include/crm/fencing/Makefile.am | 3 --- lib/cib/Makefile.am | 5 ----- lib/cluster/Makefile.am | 8 -------- lib/common/Makefile.am | 4 ---- lib/fencing/Makefile.am | 2 -- lib/lrmd/Makefile.am | 3 --- lib/pengine/Makefile.am | 4 ---- lib/services/Makefile.am | 2 -- lib/transition/Makefile.am | 5 ----- tools/Makefile.am | 11 ----------- 14 files changed, 60 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0edf0c9..5d1a689 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,5 +73,3 @@ dist-clean-local: maintainer-clean-local: rm -f libltdl.tar - -.PHONY: rpm pkg handy handy-copy diff --git a/attrd/Makefile.am b/attrd/Makefile.am index 0c5d456..9a841e5 100644 --- a/attrd/Makefile.am +++ b/attrd/Makefile.am @@ -21,8 +21,6 @@ halibdir = $(CRM_DAEMON_DIR) halib_PROGRAMS = attrd ## SOURCES -noinst_HEADERS = - attrd_SOURCES = attrd_LDADD = $(top_builddir)/lib/cluster/libcrmcluster.la \ $(top_builddir)/lib/common/libcrmcommon.la \ @@ -37,9 +35,3 @@ endif clean-generic: rm -f *.log *.debug *.xml *~ - -install-exec-local: - -uninstall-local: - -.PHONY: install-exec-hook diff --git a/fencing/Makefile.am b/fencing/Makefile.am index 383c217..bef6e6e 100644 --- a/fencing/Makefile.am +++ b/fencing/Makefile.am @@ -17,8 +17,6 @@ # include $(top_srcdir)/Makefile.common -SUBDIRS = - ## binary progs testdir = $(datadir)/$(PACKAGE)/tests/fencing test_SCRIPTS = regression.py diff --git a/include/crm/Makefile.am b/include/crm/Makefile.am index ef96011..bdb627c 100644 --- a/include/crm/Makefile.am +++ b/include/crm/Makefile.am @@ -19,7 +19,6 @@ MAINTAINERCLEANFILES = Makefile.in headerdir=$(pkgincludedir)/crm -noinst_HEADERS = header_HEADERS = crm.h cib.h attrd.h msg_xml.h transition.h stonith-ng.h cluster.h lrmd.h services.h error.h compatibility.h SUBDIRS = common pengine cib fencing cluster diff --git a/include/crm/fencing/Makefile.am b/include/crm/fencing/Makefile.am index f85c842..57a787b 100644 --- a/include/crm/fencing/Makefile.am +++ b/include/crm/fencing/Makefile.am @@ -17,7 +17,4 @@ # MAINTAINERCLEANFILES = Makefile.in -headerdir=$(pkgincludedir)/crm/fencing - noinst_HEADERS = internal.h -header_HEADERS = diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am index 687b9f3..07bf261 100644 --- a/lib/cib/Makefile.am +++ b/lib/cib/Makefile.am @@ -21,7 +21,6 @@ include $(top_srcdir)/Makefile.common lib_LTLIBRARIES = libcib.la ## SOURCES -noinst_HEADERS = libcib_la_SOURCES = cib_ops.c cib_utils.c cib_client.c cib_native.c cib_attrs.c libcib_la_SOURCES += cib_file.c cib_remote.c @@ -31,7 +30,3 @@ libcib_la_CFLAGS = -I$(top_srcdir) clean-generic: rm -f *.log *.debug *.xml *~ - -install-exec-local: - -uninstall-local: diff --git a/lib/cluster/Makefile.am b/lib/cluster/Makefile.am index f5f40bc..dcc1fbd 100644 --- a/lib/cluster/Makefile.am +++ b/lib/cluster/Makefile.am @@ -17,10 +17,6 @@ # include $(top_srcdir)/Makefile.common -headerdir=$(pkgincludedir)/crm/cluster - -header_HEADERS = - ## libraries lib_LTLIBRARIES = libcrmcluster.la @@ -45,7 +41,3 @@ endif clean-generic: rm -f *.log *.debug *.xml *~ - -install-exec-local: - -uninstall-local: diff --git a/lib/common/Makefile.am b/lib/common/Makefile.am index 7ae1dc8..111628f 100644 --- a/lib/common/Makefile.am +++ b/lib/common/Makefile.am @@ -44,7 +44,3 @@ libcrmcommon_la_SOURCES += $(top_builddir)/lib/gnu/md5.c clean-generic: rm -f *.log *.debug *.xml *~ - -install-exec-local: - -uninstall-local: diff --git a/lib/fencing/Makefile.am b/lib/fencing/Makefile.am index aa57ba5..a9f9874 100644 --- a/lib/fencing/Makefile.am +++ b/lib/fencing/Makefile.am @@ -23,5 +23,3 @@ lib_LTLIBRARIES = libstonithd.la libstonithd_la_SOURCES = st_client.c libstonithd_la_LDFLAGS = -version-info 4:1:2 libstonithd_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la - -AM_CFLAGS = $(AM_CPPFLAGS) diff --git a/lib/lrmd/Makefile.am b/lib/lrmd/Makefile.am index 8c76a78..c23fef5 100644 --- a/lib/lrmd/Makefile.am +++ b/lib/lrmd/Makefile.am @@ -23,6 +23,3 @@ liblrmd_la_LDFLAGS = -version-info 4:0:3 liblrmd_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la \ $(top_builddir)/lib/services/libcrmservice.la \ $(top_builddir)/lib/fencing/libstonithd.la - - -AM_CFLAGS = $(AM_CPPFLAGS) diff --git a/lib/pengine/Makefile.am b/lib/pengine/Makefile.am index 4544377..a0d19e5 100644 --- a/lib/pengine/Makefile.am +++ b/lib/pengine/Makefile.am @@ -34,7 +34,3 @@ libpe_status_la_LIBADD = @CURSESLIBS@ $(top_builddir)/lib/common/libcrmcommon.l clean-generic: rm -f *.log *.debug *~ - -install-exec-local: - -uninstall-local: diff --git a/lib/services/Makefile.am b/lib/services/Makefile.am index a9fe26d..2797b53 100644 --- a/lib/services/Makefile.am +++ b/lib/services/Makefile.am @@ -39,5 +39,3 @@ endif if BUILD_SYSTEMD libcrmservice_la_SOURCES += systemd.c endif - -AM_CFLAGS = $(AM_CPPFLAGS) diff --git a/lib/transition/Makefile.am b/lib/transition/Makefile.am index 6cc9bca..7bcfc1a 100644 --- a/lib/transition/Makefile.am +++ b/lib/transition/Makefile.am @@ -21,7 +21,6 @@ include $(top_srcdir)/Makefile.common lib_LTLIBRARIES = libtransitioner.la ## SOURCES -noinst_HEADERS = libtransitioner_la_SOURCES = unpack.c graph.c utils.c libtransitioner_la_LDFLAGS = -version-info 2:5:0 @@ -30,7 +29,3 @@ libtransitioner_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la clean-generic: rm -f *~ - -install-exec-local: - -uninstall-local: diff --git a/tools/Makefile.am b/tools/Makefile.am index 555b1db..59ce743 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -26,9 +26,6 @@ COMMONLIBS = \ $(top_builddir)/lib/cib/libcib.la \ $(CURSESLIBS) $(CLUSTERLIBS) -headerdir = $(pkgincludedir)/crm -header_HEADERS = - pcmkdir = $(datadir)/$(PACKAGE) pcmk_DATA = report.common report.collector @@ -57,8 +54,6 @@ endif ## SOURCES -noinst_HEADERS = - MAN8DEPS = crm_attribute crm_node crmadmin_SOURCES = crmadmin.c @@ -143,10 +138,4 @@ ipmiservicelogd_CFLAGS = $(OPENIPMI_SERVICELOG_CFLAGS) $(SERVICELOG_CFLAGS) ipmiservicelogd_LDFLAGS = $(top_builddir)/lib/common/libcrmcommon.la $(OPENIPMI_SERVICELOG_LIBS) $(SERVICELOG_LIBS) endif -install-exec-local: - -uninstall-local: - -.PHONY: install-exec-hook - CLEANFILES = $(man8_MANS) -- 1.8.3.1 From 048efbf21a84568816b35522ed5f7b84f9ffdc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 20 Jun 2016 15:10:34 +0200 Subject: [PATCH 3/5] Build: drop superfluous libcrmcluster_la_DEPENDENCIES var --- lib/cluster/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/cluster/Makefile.am b/lib/cluster/Makefile.am index dcc1fbd..ffa2a73 100644 --- a/lib/cluster/Makefile.am +++ b/lib/cluster/Makefile.am @@ -23,7 +23,6 @@ lib_LTLIBRARIES = libcrmcluster.la libcrmcluster_la_SOURCES = election.c cluster.c membership.c libcrmcluster_la_LDFLAGS = -version-info 6:0:2 libcrmcluster_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la $(top_builddir)/lib/fencing/libstonithd.la $(CLUSTERLIBS) -libcrmcluster_la_DEPENDENCIES = $(top_builddir)/lib/common/libcrmcommon.la $(top_builddir)/lib/fencing/libstonithd.la if BUILD_CS_SUPPORT libcrmcluster_la_SOURCES += cpg.c -- 1.8.3.1 From f5042bf76d048cb1fb77f9a60253cbf5a0ee9fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Mon, 20 Jun 2016 21:09:00 +0200 Subject: [PATCH 4/5] Build: cib/Makefile.am: avoid second-guessing Libtool Explicitly referring to location that is an implementation detail of Libtool is not very reasonable and appears to be working regardless. --- lib/cib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cib/Makefile.am b/lib/cib/Makefile.am index 07bf261..0c57eee 100644 --- a/lib/cib/Makefile.am +++ b/lib/cib/Makefile.am @@ -24,7 +24,7 @@ lib_LTLIBRARIES = libcib.la libcib_la_SOURCES = cib_ops.c cib_utils.c cib_client.c cib_native.c cib_attrs.c libcib_la_SOURCES += cib_file.c cib_remote.c -libcib_la_LDFLAGS = -version-info 5:1:1 -L$(top_builddir)/lib/pengine/.libs +libcib_la_LDFLAGS = -version-info 5:1:1 libcib_la_LIBADD = $(CRYPTOLIB) $(top_builddir)/lib/pengine/libpe_rules.la $(top_builddir)/lib/common/libcrmcommon.la libcib_la_CFLAGS = -I$(top_srcdir) -- 1.8.3.1 From 8a86b03d1dbb8bab4a38f39544c519a2e7e85136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= Date: Fri, 10 Jun 2016 17:55:57 +0200 Subject: [PATCH 5/5] Build: Makefile.am f.: move/drop comments to reflect previous commits * "# lex/yacc issues": - introduced with 800b0c3 ("CFLAGS = $(CFLAGS_COPY:-Werror=)") - comment + the statement got separated as of ae6fb13 * "# utils.h pengine.h" - introduced with a4d9634 - became superfluous as of ef1f2e2 --- fencing/Makefile.am | 4 +--- pengine/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fencing/Makefile.am b/fencing/Makefile.am index bef6e6e..79fe2ed 100644 --- a/fencing/Makefile.am +++ b/fencing/Makefile.am @@ -56,9 +56,6 @@ BUILT_SOURCES = standalone_config.h stonithd_SOURCES += standalone_config.c config.y config.l stonithd_AM_LFLAGS = -o$(LEX_OUTPUT_ROOT).c - -# lex/yacc issues: - endif stonithd_YFLAGS = -d @@ -69,6 +66,7 @@ stonithd_LDADD = $(top_builddir)/lib/common/libcrmcommon.la \ $(top_builddir)/pengine/libpengine.la \ $(CRYPTOLIB) $(CLUSTERLIBS) +# lex/yacc issues: CFLAGS = $(CFLAGS_COPY:-Werror=) CLEANFILES = $(man7_MANS) $(man8_MANS) diff --git a/pengine/Makefile.am b/pengine/Makefile.am index 172a86b..170b728 100644 --- a/pengine/Makefile.am +++ b/pengine/Makefile.am @@ -58,8 +58,8 @@ man7_MANS = pengine.7 endif ## SOURCES + noinst_HEADERS = allocate.h utils.h pengine.h -#utils.h pengine.h libpengine_la_LDFLAGS = -version-info 11:0:1 # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version -- 1.8.3.1