From b668d1df75c0995004b1ac3e31f8148ae148bf19 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 11 Feb 2005 01:24:30 +0000 Subject: [PATCH] originally by phil do not dist non-linux (darwin) files by default. --- build/autoconf/Makefile.am | 6 ++++-- lnet/autoconf/lustre-lnet.m4 | 12 ++++++++--- lnet/include/libcfs/Makefile.am | 6 +++++- lnet/include/lnet/Makefile.am | 6 +++++- lnet/klnds/socklnd/autoMakefile.am | 41 ++++++++++++++++---------------------- lnet/libcfs/autoMakefile.am | 21 +++++++++++-------- 6 files changed, 53 insertions(+), 39 deletions(-) diff --git a/build/autoconf/Makefile.am b/build/autoconf/Makefile.am index 23729e7..5ee43813 100644 --- a/build/autoconf/Makefile.am +++ b/build/autoconf/Makefile.am @@ -1,2 +1,4 @@ -EXTRA_DIST := lustre-build.m4 lustre-build-darwin.m4 lustre-build-linux.m4 - +EXTRA_DIST := lustre-build.m4 lustre-build-linux.m4 +if DARWIN +EXTRA_DIST += lustre-build-darwin.m4 +endif diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index b2abf0a..6780155 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -581,10 +581,8 @@ portals/autoconf/Makefile portals/doc/Makefile portals/include/Makefile portals/include/libcfs/Makefile -portals/include/libcfs/darwin/Makefile portals/include/libcfs/linux/Makefile portals/include/portals/Makefile -portals/include/portals/darwin/Makefile portals/include/portals/linux/Makefile portals/knals/Makefile portals/knals/autoMakefile @@ -606,7 +604,6 @@ portals/knals/socknal/Makefile portals/knals/socknal/autoMakefile portals/libcfs/Makefile portals/libcfs/autoMakefile -portals/libcfs/darwin/Makefile portals/libcfs/linux/Makefile portals/portals/Makefile portals/portals/autoMakefile @@ -617,4 +614,13 @@ portals/tests/autoMakefile portals/unals/Makefile portals/utils/Makefile ]) +case $lb_target_os in + darwin) + AC_CONFIG_FILES([ +portals/include/libcfs/darwin/Makefile +portals/include/portals/darwin/Makefile +portals/libcfs/darwin/Makefile +]) + ;; +esac ]) diff --git a/lnet/include/libcfs/Makefile.am b/lnet/include/libcfs/Makefile.am index 47604ef..50e377a 100644 --- a/lnet/include/libcfs/Makefile.am +++ b/lnet/include/libcfs/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS := darwin linux +SUBDIRS := linux +if DARWIN +SUBDIRS += darwin +endif +DIST_SUBDIRS := $(SUBDIRS) EXTRA_DIST := curproc.h kp30.h libcfs.h list.h lltrace.h portals_lib.h \ portals_utils.h user-lock.h user-prim.h user-time.h diff --git a/lnet/include/lnet/Makefile.am b/lnet/include/lnet/Makefile.am index 55cd240..3df0f2b 100644 --- a/lnet/include/lnet/Makefile.am +++ b/lnet/include/lnet/Makefile.am @@ -1,6 +1,10 @@ portalsdir=$(includedir)/portals -SUBDIRS := darwin linux +SUBDIRS := linux +if DARWIN +SUBDIRS += darwin +endif +DIST_SUBDIRS := $(SUBDIRS) EXTRA_DIST = api.h api-support.h build_check.h errno.h \ internal.h kpr.h lib-p30.h lib-types.h \ diff --git a/lnet/klnds/socklnd/autoMakefile.am b/lnet/klnds/socklnd/autoMakefile.am index 5abd135..3cefece 100644 --- a/lnet/klnds/socklnd/autoMakefile.am +++ b/lnet/klnds/socklnd/autoMakefile.am @@ -1,37 +1,30 @@ -# Copyright (C) 2001 Cluster File Systems, Inc. -# -# This code is issued under the GNU General Public License. -# See the file COPYING in this distribution - -if MODULES +if LINUX if !CRAY_PORTALS -if LINUX -modulenet_DATA = ksocknal$(KMODEXT) -endif + modulenet_DATA := ksocknal$(KMODEXT) -if DARWIN -macos_PROGRAMS := ksocknal +endif # !CRAY_PORTALS +endif # LINUX -ksocknal_SOURCES := socknal.c socknal_cb.c socknal_lib-darwin.c +DIST_SOURCES := $(ksocknal-objs:%.o=%.c) socknal_lib-linux.h socknal.h -ksocknal_CFLAGS := $(EXTRA_KCFLAGS) -ksocknal_LDFLAGS := $(EXTRA_KLDFLAGS) -ksocknal_LDADD := $(EXTRA_KLIBS) +if DARWIN -plist_DATA := Info.plist + macos_PROGRAMS := ksocknal -install_data_hook := fix-kext-ownership + nodist_ksocknal_SOURCES := socknal.c socknal_cb.c socknal_lib-darwin.c + DIST_SOURCES += socknal_lib-darwin.c socknal_lib-darwin.h -endif + ksocknal_CFLAGS := $(EXTRA_KCFLAGS) + ksocknal_LDFLAGS := $(EXTRA_KLDFLAGS) + ksocknal_LDADD := $(EXTRA_KLIBS) -endif -endif + plist_DATA := Info.plist + install_data_hook := fix-kext-ownership -install-data-hook: $(install_data_hook) +endif # DARWIN -EXTRA_DIST := Info.plist +EXTRA_DIST := $(plist_DATA) +install-data-hook: $(install_data_hook) MOSTLYCLEANFILES = *.o *.ko *.mod.c socknal_lib.c -DIST_SOURCES = $(ksocknal-objs:%.o=%.c) socknal_lib-darwin.c \ - socknal_lib-darwin.h socknal_lib-linux.h socknal.h diff --git a/lnet/libcfs/autoMakefile.am b/lnet/libcfs/autoMakefile.am index 92959e5..5bc2c08 100644 --- a/lnet/libcfs/autoMakefile.am +++ b/lnet/libcfs/autoMakefile.am @@ -3,7 +3,11 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -SUBDIRS := darwin linux +SUBDIRS := linux +if DARWIN +SUBDIRS += darwin +endif +DIST_SUBDIRS := $(SUBDIRS) if MODULES @@ -14,11 +18,12 @@ endif if DARWIN macos_PROGRAMS := libcfs -libcfs_SOURCES := debug.c module.c tracefile.c darwin/darwin-debug.c \ - darwin/darwin-fs.c darwin/darwin-mem.c darwin/darwin-module.c \ - darwin/darwin-prim.c darwin/darwin-proc.c \ - darwin/darwin-tracefile.c darwin/darwin-utils.c \ - darwin/darwin-sync.c darwin/darwin-curproc.c user-prim.c user-lock.c +nodist_libcfs_SOURCES := debug.c module.c tracefile.c \ + darwin/darwin-debug.c darwin/darwin-fs.c darwin/darwin-mem.c \ + darwin/darwin-module.c darwin/darwin-prim.c \ + darwin/darwin-proc.c darwin/darwin-tracefile.c \ + darwin/darwin-utils.c darwin/darwin-sync.c \ + darwin/darwin-curproc.c user-prim.c user-lock.c libcfs_CFLAGS := $(EXTRA_KCFLAGS) libcfs_LDFLAGS := $(EXTRA_KLDFLAGS) @@ -36,5 +41,5 @@ install-data-hook: $(install_data_hook) EXTRA_DIST := Info.plist -MOSTLYCLEANFILES = *.o *.ko *.mod.c linux-*.c linux/*.o darwin/*.o libcfs -DIST_SOURCES = $(libcfs-all-objs:%.o=%.c) tracefile.h +MOSTLYCLEANFILES := *.o *.ko *.mod.c linux-*.c linux/*.o darwin/*.o libcfs +DIST_SOURCES := $(libcfs-all-objs:%.o=%.c) tracefile.h -- 1.8.3.1