From 4c3858b3c88d2a2f443d348945229f5995f3e1dd Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Thu, 23 Apr 2015 00:42:46 +0300 Subject: [PATCH] LU-6484 build: remove unused LIBLUSTRE stuff - Remove unused LIBLUSTRE stuff - Fix packaging for ptlrpc module - Remove liblustre.h - Remove LIBLUSTRE_TEST - Remove LLCPPFLAGS and LLCFLAGS - Remove AC_LUSTRE_LIB_VER_OFFSET_WARN Signed-off-by: Dmitry Eremin Change-Id: Ib1735e75a8e1b043eacca861448cecdfc84283cd Reviewed-on: http://review.whamcloud.com/14543 Reviewed-by: John L. Hammond Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: frank zago Reviewed-by: Oleg Drokin --- config/lustre-build.m4 | 9 -------- libcfs/libcfs/autoMakefile.am | 20 +++++++++-------- lnet/lnet/autoMakefile.am | 9 ++------ lnet/selftest/Makefile.in | 3 ++- lnet/selftest/autoMakefile.am | 15 +++---------- lnet/utils/Makefile.am | 17 ++++++++------- lnet/utils/lnetconfig/Makefile.am | 11 ++++------ lustre/autoconf/lustre-core.m4 | 1 - lustre/autoconf/lustre-version.ac | 3 --- lustre/fld/autoMakefile.am | 9 +------- lustre/include/Makefile.am | 1 - lustre/include/liblustre.h | 41 ----------------------------------- lustre/include/lustre_ver.h.in | 5 ----- lustre/mdc/autoMakefile.am | 11 ++-------- lustre/obdecho/autoMakefile.am | 13 ++++------- lustre/osc/autoMakefile.am | 14 +++--------- lustre/ptlrpc/Makefile.in | 18 +++++++--------- lustre/ptlrpc/autoMakefile.am | 37 ++------------------------------ lustre/ptlrpc/gss/autoMakefile.am | 5 +---- lustre/tests/Makefile.am | 17 +++++++-------- lustre/tests/mpi/Makefile.am | 5 +++-- lustre/utils/Makefile.am | 45 +++++++++++++++++++-------------------- lustre/utils/gss/Makefile.am | 10 ++++----- lustre/utils/lctl.c | 6 ++---- 24 files changed, 91 insertions(+), 234 deletions(-) delete mode 100644 lustre/include/liblustre.h diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index a0bd33b..c3bf669 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -396,13 +396,6 @@ AS_IF([test $target_cpu = powerpc64], [ CPPFLAGS="-I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include $CPPFLAGS" -LLCPPFLAGS="-D_LARGEFILE64_SOURCE=1" -AC_SUBST(LLCPPFLAGS) - -# Add _GNU_SOURCE for strnlen on linux -LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE" -AC_SUBST(LLCFLAGS) - CCASFLAGS="-Wall -fPIC -D_GNU_SOURCE" AC_SUBST(CCASFLAGS) @@ -693,10 +686,8 @@ cat <<_ACEOF CC: $CC LD: $LD CPPFLAGS: $CPPFLAGS -LLCPPFLAGS: $LLCPPFLAGS CFLAGS: $CFLAGS EXTRA_KCFLAGS: $EXTRA_KCFLAGS -LLCFLAGS: $LLCFLAGS Type 'make' to build Lustre. _ACEOF diff --git a/libcfs/libcfs/autoMakefile.am b/libcfs/libcfs/autoMakefile.am index b706b52..19638d1 100644 --- a/libcfs/libcfs/autoMakefile.am +++ b/libcfs/libcfs/autoMakefile.am @@ -40,23 +40,25 @@ SUBDIRS = linux util DIST_SUBDIRS = linux util noinst_LIBRARIES= libcfs.a -libcfs_a_SOURCES = util/string.c util/nidstrings.c - -libcfs_a_CPPFLAGS = $(LLCPPFLAGS) -libcfs_a_CFLAGS = $(LLCFLAGS) +libcfs_a_SOURCES := util/string.c util/nidstrings.c +libcfs_a_CPPFLAGS := -D_GNU_SOURCE +libcfs_a_CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 +libcfs_a_CFLAGS := -fPIC if UTILS lib_LIBRARIES = libcfsutil.a -libcfsutil_a_SOURCES = util/parser.c util/l_ioctl.c -libcfsutil_a_CPPFLAGS = $(LLCPPFLAGS) -libcfsutil_a_CFLAGS = $(LLCFLAGS) -DLUSTRE_UTILS=1 -endif +libcfsutil_a_SOURCES := util/parser.c util/l_ioctl.c +libcfsutil_a_CPPFLAGS := -D_GNU_SOURCE +libcfsutil_a_CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 +libcfsutil_a_CPPFLAGS += -DLUSTRE_UTILS=1 +libcfsutil_a_CFLAGS := -fPIC +endif # UTILS if MODULES if LINUX modulenet_DATA := libcfs$(KMODEXT) -endif +endif # LINUX endif # MODULES diff --git a/lnet/lnet/autoMakefile.am b/lnet/lnet/autoMakefile.am index a569e9f..eccb202 100644 --- a/lnet/lnet/autoMakefile.am +++ b/lnet/lnet/autoMakefile.am @@ -1,9 +1,3 @@ -my_sources = api-ni.c config.c nidstring.c \ - lib-me.c lib-msg.c lib-eq.c lib-socket.c \ - lib-md.c lib-ptl.c lib-move.c lo.c \ - router.c router_proc.c \ - acceptor.c peer.c net_fault.c - if MODULES if LINUX @@ -12,5 +6,6 @@ endif # LINUX endif # MODULES +EXTRA_DIST := $(lnet-objs:%.o=%.c) + MOSTLYCLEANFILES = @MOSTLYCLEANFILES@ lnet -EXTRA_DIST = $(lnet-objs:%.o=%.c) diff --git a/lnet/selftest/Makefile.in b/lnet/selftest/Makefile.in index 7acc249..58926b8 100644 --- a/lnet/selftest/Makefile.in +++ b/lnet/selftest/Makefile.in @@ -1,6 +1,7 @@ MODULES := lnet_selftest -lnet_selftest-objs := console.o conrpc.o conctl.o framework.o timer.o rpc.o module.o ping_test.o brw_test.o +lnet_selftest-objs := console.o conrpc.o conctl.o framework.o timer.o rpc.o \ + module.o ping_test.o brw_test.o default: all diff --git a/lnet/selftest/autoMakefile.am b/lnet/selftest/autoMakefile.am index 04d726e..c7813b1 100644 --- a/lnet/selftest/autoMakefile.am +++ b/lnet/selftest/autoMakefile.am @@ -1,14 +1,3 @@ -my_sources = console.c conrpc.c conctl.c console.h conrpc.h \ - framework.c timer.c rpc.c module.c \ - ping_test.c brw_test.c - -if LIBLUSTRE -noinst_LIBRARIES= libselftest.a -libselftest_a_SOURCES= $(my_sources) -libselftest_a_CPPFLAGS = $(LLCPPFLAGS) -libselftest_a_CFLAGS = $(LLCFLAGS) -endif - if MODULES if LINUX @@ -17,5 +6,7 @@ endif # LINUX endif # MODULES +EXTRA_DIST := $(lnet_selftest-objs:%.o=%.c) +EXTRA_DIST += console.h conrpc.h rpc.h selftest.h timer.h + MOSTLYCLEANFILES = @MOSTLYCLEANFILES@ selftest -EXTRA_DIST = $(lnet_selftest-objs:%.o=%.c) console.h conrpc.h rpc.h selftest.h timer.h diff --git a/lnet/utils/Makefile.am b/lnet/utils/Makefile.am index 01c239d..7563447 100644 --- a/lnet/utils/Makefile.am +++ b/lnet/utils/Makefile.am @@ -36,12 +36,13 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -AM_CFLAGS = $(LLCFLAGS) +AM_CFLAGS := -fPIC -D_GNU_SOURCE +AM_LDFLAGS := -L. if BUILD_DLC SUBDIRS = lnetconfig -AM_LDFLAGS := -L$(top_builddir)/lnet/utils/lnetconfig -endif +AM_LDFLAGS += -L$(top_builddir)/lnet/utils/lnetconfig +endif # BUILD_DLC LIBCFS= $(top_builddir)/libcfs/libcfs/libcfs.a LIBCFSUTIL= $(top_builddir)/libcfs/libcfs/libcfsutil.a @@ -51,19 +52,19 @@ sbin_PROGRAMS = routerstat lst if BUILD_DLC sbin_PROGRAMS += lnetctl -endif +endif # BUILD_DLC routerstat_SOURCES = routerstat.c lst_SOURCES = lst.c -lst_LDADD = -L. -lptlctl $(LIBCFSUTIL) $(LIBCFS) $(LIBREADLINE) $(LIBEFENCE) +lst_LDADD = -lptlctl $(LIBCFSUTIL) $(LIBCFS) $(LIBREADLINE) $(LIBEFENCE) lst_DEPENDENCIES = libptlctl.a if TESTS sbin_PROGRAMS += wirecheck wirecheck_SOURCES = wirecheck.c -endif +endif # TESTS lib_LIBRARIES = libptlctl.a @@ -71,7 +72,7 @@ libptlctl_a_SOURCES = portals.c debug.c CYAML := $(top_builddir)/lnet/utils/cyaml/cyaml.c lnetctl_SOURCES = lnetctl.c $(CYAML) -lnetctl_LDADD = -L. -lm -lyaml -llnetconfig \ - $(LIBCFSUTIL) $(LIBCFS) $(LIBREADLINE) $(LIBEFENCE) +lnetctl_LDADD = -llnetconfig $(LIBCFSUTIL) $(LIBCFS) \ + $(LIBREADLINE) $(LIBEFENCE) -lyaml -lm lnetctl_DEPENDENCIES = $(top_builddir)/lnet/utils/lnetconfig/liblnetconfig.so endif # UTILS diff --git a/lnet/utils/lnetconfig/Makefile.am b/lnet/utils/lnetconfig/Makefile.am index cb4e980..689c2e1 100644 --- a/lnet/utils/lnetconfig/Makefile.am +++ b/lnet/utils/lnetconfig/Makefile.am @@ -26,12 +26,10 @@ # Amir Shehata # -SUBDIRS = - -AM_CFLAGS=$(LLCFLAGS) -AM_CPPFLAGS=$(LLCPPFLAGS) -I$(top_builddir)/lnet/utils \ - -I$(top_builddir)/lnet/utils/cyaml \ - -DLUSTRE_UTILS=1 +AM_CFLAGS := -fPIC \ + -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 \ + -I$(top_builddir)/lnet/utils \ + -I$(top_builddir)/lnet/utils/cyaml AM_LDFLAGS := -L$(top_builddir)/libcfs/libcfs lib_LIBRARIES = liblnetconfig.a @@ -40,7 +38,6 @@ noinst_LIBRARIES = liblnetconfigtmp.a CYAML := $(top_builddir)/lnet/utils/cyaml/cyaml.c \ $(top_builddir)/lnet/utils/cyaml/cyaml.h liblnetconfigtmp_a_SOURCES := liblnetconfig.c liblnetconfig.h $(CYAML) -liblnetconfigtmp_a_CPPFLAGS := $(AM_CPPFLAGS) # build static and share lib lnet config library liblnetconfig.a : liblnetconfigtmp.a diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 1d89199..0ee18aa 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -2033,7 +2033,6 @@ AS_IF([test "x$enable_pgstat_track" = xyes], # AM_CONDITIONALS for lustre # AC_DEFUN([LC_CONDITIONALS], [ -AM_CONDITIONAL(LIBLUSTRE, false) AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests) AM_CONDITIONAL(CLIENT, test x$enable_client = xyes) AM_CONDITIONAL(SERVER, test x$enable_server = xyes) diff --git a/lustre/autoconf/lustre-version.ac b/lustre/autoconf/lustre-version.ac index 9e2a259..f9ea770 100644 --- a/lustre/autoconf/lustre-version.ac +++ b/lustre/autoconf/lustre-version.ac @@ -6,7 +6,6 @@ m4_define([LUSTRE_FIX],[0]) dnl # liblustre delta is 0.0.1.32 , next version with fixes is ok, but dnl # after following release candidate/beta would spill this warning already. m4_define([LUSTRE_VER_ALLOWED_OFFSET],["OBD_OCD_VERSION(0, 0, 1, 32)"]) -m4_define([LUSTRE_LIB_VER_OFFSET_WARN],["OBD_OCD_VERSION(0, 0, 1, 32)"]) dnl # linux lustre delta is 0.4.0.0 , next stable release version is ok m4_define([LUSTRE_CLI_VER_OFFSET_WARN],["OBD_OCD_VERSION(0, 4, 50, 0)"]) @@ -22,7 +21,6 @@ m4_define([LUSTRE_VERSION],m4_if(LUSTRE_FIX,[0],LUSTRE_MAJOR.LUSTRE_MINOR.LUSTRE [AC_LUSTRE_FIX]=LUSTRE_FIX [AC_LUSTRE_VERSION_STRING]=LUSTRE_VERSION [AC_LUSTRE_VER_ALLOWED_OFFSET]=LUSTRE_VER_ALLOWED_OFFSET -[AC_LUSTRE_LIB_VER_OFFSET_WARN]=LUSTRE_LIB_VER_OFFSET_WARN [AC_LUSTRE_CLI_VER_OFFSET_WARN]=LUSTRE_CLI_VER_OFFSET_WARN AC_SUBST([AC_LUSTRE_MAJOR]) @@ -31,5 +29,4 @@ AC_SUBST([AC_LUSTRE_PATCH]) AC_SUBST([AC_LUSTRE_FIX]) AC_SUBST([AC_LUSTRE_VERSION_STRING]) AC_SUBST([AC_LUSTRE_VER_ALLOWED_OFFSET]) -AC_SUBST([AC_LUSTRE_LIB_VER_OFFSET_WARN]) AC_SUBST([AC_LUSTRE_CLI_VER_OFFSET_WARN]) diff --git a/lustre/fld/autoMakefile.am b/lustre/fld/autoMakefile.am index bc5ed6b..f749580 100644 --- a/lustre/fld/autoMakefile.am +++ b/lustre/fld/autoMakefile.am @@ -34,15 +34,8 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -if LIBLUSTRE -noinst_LIBRARIES = libfld.a -libfld_a_SOURCES = fld_request.c fld_cache.c lproc_fld.c fld_internal.h -libfld_a_CPPFLAGS = $(LLCPPFLAGS) -libfld_a_CFLAGS = $(LLCFLAGS) -endif - if MODULES modulefs_DATA = fld$(KMODEXT) -endif +endif # MODULES MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/include/Makefile.am b/lustre/include/Makefile.am index d1bfe58..435f104 100644 --- a/lustre/include/Makefile.am +++ b/lustre/include/Makefile.am @@ -44,7 +44,6 @@ EXTRA_DIST = \ cl_object.h \ dt_object.h \ interval_tree.h \ - liblustre.h \ lprocfs_status.h \ lu_object.h \ lu_ref.h \ diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h deleted file mode 100644 index 2060471..0000000 --- a/lustre/include/liblustre.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2014, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/include/liblustre.h - * - * User-space Lustre headers. - */ - -#error "do not include " diff --git a/lustre/include/lustre_ver.h.in b/lustre/include/lustre_ver.h.in index b61567c..cb8ac71 100644 --- a/lustre/include/lustre_ver.h.in +++ b/lustre/include/lustre_ver.h.in @@ -30,11 +30,6 @@ * than this amount, client would issue a warning. * (set in lustre/autoconf/lustre-version.ac) */ #define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_CLI_VER_OFFSET_WARN@ -#else -/* If liblustre version of client and servers it connects to differs by more - * than this amount, client would issue a warning. - * (set in lustre/autoconf/lustre-version.ac) */ -#define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_LIB_VER_OFFSET_WARN@ #endif #endif diff --git a/lustre/mdc/autoMakefile.am b/lustre/mdc/autoMakefile.am index bbbfc24..8007b0f 100644 --- a/lustre/mdc/autoMakefile.am +++ b/lustre/mdc/autoMakefile.am @@ -34,15 +34,8 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -if LIBLUSTRE -noinst_LIBRARIES = libmdc.a -libmdc_a_SOURCES = mdc_request.c mdc_reint.c mdc_lib.c mdc_internal.h mdc_locks.c -libmdc_a_CPPFLAGS = $(LLCPPFLAGS) -libmdc_a_CFLAGS = $(LLCFLAGS) -endif - if MODULES modulefs_DATA = mdc$(KMODEXT) -endif +endif # MODULES -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ +MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/obdecho/autoMakefile.am b/lustre/obdecho/autoMakefile.am index b9c1dba..fb08c27 100644 --- a/lustre/obdecho/autoMakefile.am +++ b/lustre/obdecho/autoMakefile.am @@ -36,17 +36,12 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -if LIBLUSTRE -noinst_LIBRARIES = libobdecho.a -libobdecho_a_SOURCES = echo_client.c -libobdecho_a_CPPFLAGS = $(LLCPPFLAGS) -libobdecho_a_CFLAGS = $(LLCFLAGS) -endif - if MODULES + if LINUX modulefs_DATA = obdecho$(KMODEXT) -endif +endif # LINUX + endif # MODULES -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ +MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/osc/autoMakefile.am b/lustre/osc/autoMakefile.am index b749c64..1bf07e4 100644 --- a/lustre/osc/autoMakefile.am +++ b/lustre/osc/autoMakefile.am @@ -36,20 +36,12 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -if LIBLUSTRE -noinst_LIBRARIES = libosc.a -libosc_a_SOURCES = osc_request.c osc_internal.h osc_cl_internal.h osc_dev.c osc_object.c osc_page.c osc_lock.c osc_io.c osc_quota.c osc_cache.c - -libosc_a_CPPFLAGS = $(LLCPPFLAGS) -libosc_a_CFLAGS = $(LLCFLAGS) -endif - if MODULES if LINUX modulefs_DATA = osc$(KMODEXT) -endif +endif # LINUX -endif +endif # MODULES -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ +MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/ptlrpc/Makefile.in b/lustre/ptlrpc/Makefile.in index 7a32f73..cb47a53 100644 --- a/lustre/ptlrpc/Makefile.in +++ b/lustre/ptlrpc/Makefile.in @@ -7,8 +7,12 @@ ldlm_objs += $(LDLM)ldlm_resource.o $(LDLM)ldlm_lib.o ldlm_objs += $(LDLM)ldlm_plain.o $(LDLM)ldlm_extent.o ldlm_objs += $(LDLM)ldlm_request.o $(LDLM)ldlm_lockd.o ldlm_objs += $(LDLM)ldlm_flock.o $(LDLM)ldlm_inodebits.o -ldlm_objs += $(LDLM)ldlm_pool.o -ldlm_objs += $(LDLM)interval_tree.o +ldlm_objs += $(LDLM)ldlm_pool.o $(LDLM)interval_tree.o + +target_objs := $(TARGET)tgt_main.o $(TARGET)tgt_lastrcvd.o +target_objs += $(TARGET)tgt_handler.o $(TARGET)out_handler.o +target_objs += $(TARGET)out_lib.o $(TARGET)update_trans.o + ptlrpc_objs := client.o recover.o connection.o niobuf.o pack_generic.o ptlrpc_objs += events.o ptlrpc_module.o service.o pinger.o ptlrpc_objs += llog_net.o llog_client.o llog_server.o import.o ptlrpcd.o @@ -17,12 +21,7 @@ ptlrpc_objs += sec.o sec_ctx.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o nrs_crr.o nrs_orr.o ptlrpc_objs += nrs_tbf.o errno.o -target_objs := $(TARGET)tgt_main.o $(TARGET)tgt_lastrcvd.o -target_objs += $(TARGET)tgt_handler.o $(TARGET)out_handler.o -target_objs += $(TARGET)out_lib.o -target_objs += $(TARGET)update_trans.o - -nodemap_objs = nodemap_handler.o nodemap_lproc.o nodemap_range.o +nodemap_objs := nodemap_handler.o nodemap_lproc.o nodemap_range.o nodemap_objs += nodemap_idmap.o nodemap_rbtree.o nodemap_member.o ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs) @@ -48,8 +47,7 @@ out_%.c: @LUSTRE@/target/out_%.c ln -sf $< $@ EXTRA_DIST := $(ptlrpc_objs:.o=.c) ptlrpc_internal.h -EXTRA_DIST += $(TARGET)tgt_internal.h nodemap_internal.h -@SERVER_FALSE@EXTRA_DIST += $(target_objs:.o=.c) +EXTRA_DIST += $(nodemap_objs:.o=.c) nodemap_internal.h EXTRA_PRE_CFLAGS := -I@LUSTRE@/ldlm -I@LUSTRE@/target diff --git a/lustre/ptlrpc/autoMakefile.am b/lustre/ptlrpc/autoMakefile.am index 52d652d..fc17836 100644 --- a/lustre/ptlrpc/autoMakefile.am +++ b/lustre/ptlrpc/autoMakefile.am @@ -36,44 +36,11 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -LDLM_COMM_SOURCES= $(top_srcdir)/lustre/ldlm/l_lock.c \ - $(top_srcdir)/lustre/ldlm/ldlm_lock.c \ - $(top_srcdir)/lustre/ldlm/interval_tree.c \ - $(top_srcdir)/lustre/ldlm/ldlm_resource.c \ - $(top_srcdir)/lustre/ldlm/ldlm_lib.c \ - $(top_srcdir)/lustre/ldlm/ldlm_plain.c \ - $(top_srcdir)/lustre/ldlm/ldlm_extent.c \ - $(top_srcdir)/lustre/ldlm/ldlm_request.c \ - $(top_srcdir)/lustre/ldlm/ldlm_lockd.c \ - $(top_srcdir)/lustre/ldlm/ldlm_internal.h \ - $(top_srcdir)/lustre/ldlm/ldlm_inodebits.c \ - $(top_srcdir)/lustre/ldlm/ldlm_flock.c \ - $(top_srcdir)/lustre/ldlm/ldlm_pool.c - -NODEMAP_SOURCES = nodemap_handler.c nodemap_idmap.c nodemap_lproc.c \ - nodemap_member.c nodemap_range.c nodemap_rbtree.c - -COMMON_SOURCES = client.c recover.c connection.c niobuf.c pack_generic.c \ - events.c ptlrpc_module.c service.c pinger.c llog_net.c sec_ctx.c \ - llog_client.c llog_server.c import.c ptlrpcd.c pers.c wiretest.c \ - ptlrpc_internal.h layout.c sec.c sec_bulk.c sec_gc.c sec_config.c \ - sec_lproc.c sec_null.c sec_plain.c lproc_ptlrpc.c nrs.c nrs_fifo.c \ - errno.c $(LDLM_COMM_SOURCES) $(NODEMAP_SOURCES) - -if LIBLUSTRE - -noinst_LIBRARIES = libptlrpc.a -libptlrpc_a_SOURCES = $(COMMON_SOURCES) -libptlrpc_a_CPPFLAGS = $(LLCPPFLAGS) -libptlrpc_a_CFLAGS = $(LLCFLAGS) - -endif - if MODULES if LINUX modulefs_DATA = ptlrpc$(KMODEXT) -endif #LINUX +endif # LINUX endif # MODULES @@ -81,4 +48,4 @@ if GSS SUBDIRS = gss endif -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ ldlm_*.c l_lock.c interval_tree.c +MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ ldlm_*.c l_lock.c interval_tree.c diff --git a/lustre/ptlrpc/gss/autoMakefile.am b/lustre/ptlrpc/gss/autoMakefile.am index 8d959ba..95febbd 100644 --- a/lustre/ptlrpc/gss/autoMakefile.am +++ b/lustre/ptlrpc/gss/autoMakefile.am @@ -34,12 +34,9 @@ # Lustre is a trademark of Sun Microsystems, Inc. # -if LIBLUSTRE -endif - if MODULES modulefs_DATA = ptlrpc_gss$(KMODEXT) endif # MODULES EXTRA_DIST = *.c *.h -MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ +MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ diff --git a/lustre/tests/Makefile.am b/lustre/tests/Makefile.am index 33f323c..4f73140 100644 --- a/lustre/tests/Makefile.am +++ b/lustre/tests/Makefile.am @@ -1,10 +1,10 @@ LIBCFS = $(top_builddir)/libcfs/libcfs/libcfs.a +LIBLUSTREAPI = $(top_builddir)/lustre/utils/liblustreapi.a # Lustre test Makefile -AM_CPPFLAGS = $(LLCPPFLAGS) -I/opt/lam/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS -AM_CFLAGS = $(LLCFLAGS) -# LDADD = -lldap -# LDADD = -lreadline -ltermcap # -lefence +AM_CFLAGS := -fPIC -D_GNU_SOURCE \ + -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 \ + -I/opt/lam/include DIST_SUBDIRS = mpi @@ -89,8 +89,7 @@ endif # TESTS mmap_sanity_SOURCES= mmap_sanity.c -LIBLUSTREAPI = $(top_builddir)/lustre/utils/liblustreapi.a -multiop_LDADD=$(LIBLUSTREAPI) $(PTHREAD_LIBS) $(LIBCFS) +multiop_LDADD=$(LIBLUSTREAPI) $(LIBCFS) $(PTHREAD_LIBS) llapi_layout_test_LDADD=$(LIBLUSTREAPI) llapi_hsm_test_LDADD=$(LIBLUSTREAPI) group_lock_test_LDADD=$(LIBLUSTREAPI) @@ -99,8 +98,8 @@ sendfile_grouplock_LDADD=$(LIBLUSTREAPI) it_test_LDADD=$(LIBCFS) rwv_LDADD=$(LIBCFS) -ll_dirstripe_verify_SOURCES= ll_dirstripe_verify.c -ll_dirstripe_verify_LDADD= -L$(top_builddir)/lustre/utils $(PTHREAD_LIBS) $(LIBLUSTREAPI) $(LIBCFS) +ll_dirstripe_verify_SOURCES = ll_dirstripe_verify.c +ll_dirstripe_verify_LDADD = $(LIBLUSTREAPI) $(LIBCFS) $(PTHREAD_LIBS) flocks_test_SOURCES=flocks_test.c -flocks_test_LDADD=-lpthread +flocks_test_LDADD=$(PTHREAD_LIBS) diff --git a/lustre/tests/mpi/Makefile.am b/lustre/tests/mpi/Makefile.am index c128459..ac7acb1 100644 --- a/lustre/tests/mpi/Makefile.am +++ b/lustre/tests/mpi/Makefile.am @@ -1,6 +1,7 @@ # Lustre MPI test Makefile -AM_CPPFLAGS = $(LLCPPFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS -AM_CFLAGS = $(LLCFLAGS) +AM_CFLAGS := -fPIC \ + -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 + LIBCFS := $(top_builddir)/libcfs/libcfs/libcfs.a CC = @MPICC_WRAPPER@ diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 536b434..4995e6b 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -4,8 +4,8 @@ if GSS SUBDIRS = gss endif -AM_CFLAGS=$(LLCFLAGS) -AM_CPPFLAGS=$(LLCPPFLAGS) -DLUSTRE_UTILS=1 -D_FILE_OFFSET_BITS=64 +AM_CFLAGS := -fPIC -D_GNU_SOURCE \ + -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 AM_LDFLAGS := -L$(top_builddir)/lnet/utils MNTMODLDFLAGS := -rdynamic -ldl @@ -48,7 +48,7 @@ noinst_LIBRARIES = liblustreapitmp.a endif # UTILS lctl_SOURCES = lustre_lfsck.c obd.c lustre_cfg.c lctl.c obdctl.h -lctl_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) $(LIBREADLINE) +lctl_LDADD := liblustreapi.a $(LIBPTLCTL) $(LIBREADLINE) $(PTHREAD_LIBS) lctl_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a lfs_SOURCES = lfs.c @@ -56,7 +56,7 @@ lfs_LDADD := liblustreapi.a $(LIBPTLCTL) $(LIBREADLINE) lfs_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a lustre_rsync_SOURCES = lustre_rsync.c obd.c lustre_cfg.c lustre_rsync.h -lustre_rsync_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) $(LIBREADLINE) +lustre_rsync_LDADD := liblustreapi.a $(LIBPTLCTL) $(LIBREADLINE) $(PTHREAD_LIBS) lustre_rsync_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a ll_recover_lost_found_objs_SOURCES = ll_recover_lost_found_objs.c @@ -105,7 +105,7 @@ install-exec-hook: liblustreapi.so $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$f; \ else :; fi; \ done -endif +endif # UTILS if LDISKFS_ENABLED libiam_a_SOURCES = libiam.c @@ -125,37 +125,36 @@ if ZFS_ENABLED pkglib_LTLIBRARIES += mount_osd_zfs.la mount_osd_zfs_la_SOURCES = mount_utils_zfs.c -mount_osd_zfs_la_CPPFLAGS = -DHAVE_IOCTL_IN_UNISTD_H -mount_osd_zfs_la_CPPFLAGS += $(ZFS_LIBZFS_INCLUDE) -mount_osd_zfs_la_LDFLAGS = -pthread $(ZFS_LIBZFS_LDFLAGS) -mount_osd_zfs_la_LDFLAGS += -shared -export-dynamic -module -avoid-version -endif +mount_osd_zfs_la_CPPFLAGS := -DHAVE_IOCTL_IN_UNISTD_H $(ZFS_LIBZFS_INCLUDE) +mount_osd_zfs_la_LDFLAGS := -pthread $(ZFS_LIBZFS_LDFLAGS) +mount_osd_zfs_la_LDFLAGS += -shared -export-dynamic -module -avoid-version +endif # ZFS_ENABLED if LDISKFS_ENABLED pkglib_LTLIBRARIES += mount_osd_ldiskfs.la mount_osd_ldiskfs_la_SOURCES = mount_utils_ldiskfs.c -mount_osd_ldiskfs_la_LDFLAGS = -shared -export-dynamic -module -avoid-version -mount_osd_ldiskfs_la_LIBADD := $(SELINUX) -endif +mount_osd_ldiskfs_la_LDFLAGS := -shared -export-dynamic -module -avoid-version +mount_osd_ldiskfs_la_LIBADD := $(SELINUX) +endif # LDISKFS_ENABLED mount_lustre_SOURCES = mount_lustre.c mount_utils.c mount_utils.h -mount_lustre_CPPFLAGS = $(AM_CPPFLAGS) ${MNTMODCFLAGS} -mount_lustre_LDADD := $(LIBPTLCTL) $(SELINUX) +mount_lustre_CPPFLAGS := ${MNTMODCFLAGS} +mount_lustre_LDFLAGS := ${MNTMODLDFLAGS} +mount_lustre_LDADD := $(LIBPTLCTL) $(SELINUX) mount_lustre_DEPENDENCIES := $(LIBPTLCTL) -mount_lustre_LDFLAGS = ${MNTMODLDFLAGS} mkfs_lustre_SOURCES = mkfs_lustre.c mount_utils.c mount_utils.h -mkfs_lustre_CPPFLAGS = -UTUNEFS $(AM_CPPFLAGS) ${MNTMODCFLAGS} -mkfs_lustre_LDADD := $(LIBPTLCTL) +mkfs_lustre_CPPFLAGS := -UTUNEFS ${MNTMODCFLAGS} +mkfs_lustre_LDFLAGS := ${MNTMODLDFLAGS} +mkfs_lustre_LDADD := $(LIBPTLCTL) mkfs_lustre_DEPENDENCIES := $(LIBPTLCTL) -mkfs_lustre_LDFLAGS = ${MNTMODLDFLAGS} tunefs_lustre_SOURCES = mkfs_lustre.c mount_utils.c mount_utils.h -tunefs_lustre_CPPFLAGS = -DTUNEFS $(AM_CPPFLAGS) ${MNTMODCFLAGS} -tunefs_lustre_LDADD := $(mkfs_lustre_LDADD) +tunefs_lustre_CPPFLAGS := -DTUNEFS ${MNTMODCFLAGS} +tunefs_lustre_LDFLAGS := ${MNTMODLDFLAGS} +tunefs_lustre_LDADD := $(mkfs_lustre_LDADD) tunefs_lustre_DEPENDENCIES := $(mkfs_lustre_DEPENDENCIES) -tunefs_lustre_LDFLAGS = ${MNTMODLDFLAGS} l_getidentity_SOURCES = l_getidentity.c l_getidentity_LDADD := $(LIBPTLCTL) @@ -168,7 +167,7 @@ lhsmtool_posix_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) lhsmtool_posix_DEPENDENCIES := liblustreapi.a $(LIBPTLCTL) wirecheck_SOURCES = wirecheck.c -wirecheck_CPPFLAGS = -DCC="\"$(CC)\"" +wirecheck_CPPFLAGS := -DCC="\"$(CC)\"" wiretest_SOURCES = wiretest.c diff --git a/lustre/utils/gss/Makefile.am b/lustre/utils/gss/Makefile.am index fdf2acc..1ac6868 100644 --- a/lustre/utils/gss/Makefile.am +++ b/lustre/utils/gss/Makefile.am @@ -1,12 +1,10 @@ # GSS daemons & tools Makefile -SUBDIRS = +AM_CFLAGS := -fPIC \ + -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 -AM_CFLAGS=$(LLCFLAGS) -AM_CPPFLAGS=$(LLCPPFLAGS) -DLUSTRE_UTILS=1 -AM_LDFLAGS := -L$(top_builddir)/libcfs/libcfs - -LIBCFS := $(top_builddir)/libcfs/libcfs/libcfs.a $(top_builddir)/libcfs/libcfs/libcfsutil.a +LIBCFS := $(top_builddir)/libcfs/libcfs/libcfsutil.a \ + $(top_builddir)/libcfs/libcfs/libcfs.a sbin_PROGRAMS = lsvcgssd l_idmap diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index a908de0..88c5fe8 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -506,9 +506,7 @@ int lctl_main(int argc, char **argv) return rc < 0 ? -rc : rc; } -#ifndef LIBLUSTRE_TEST -int main (int argc, char **argv) +int main(int argc, char **argv) { - return (lctl_main (argc, argv)); + return lctl_main(argc, argv); } -#endif -- 1.8.3.1