Files
scst/Makefile
Vladislav Bolkhovitin bb4d276a54 Merged revisions 7096,7101,7104,7106-7111,7115-7118,7125,7134-7137,7139,7141,7143,7152-7154,7158,7162-7163,7168-7171,7173,7175-7179,7185,7190,7193,7203,7208 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk

........
  r7096 | bvassche | 2017-02-23 18:08:17 -0800 (Thu, 23 Feb 2017) | 4 lines
  
  scst_copy_mgr: Avoid that LUN removal triggers a BUG()
  
  Reported-by: Jinpu Wang <jinpu.wang@profitbricks.com>
........
  r7101 | bvassche | 2017-03-01 07:31:59 -0800 (Wed, 01 Mar 2017) | 20 lines
  
  scst_vdisk: Avoid that LUN refresh triggers a general protection fault
  
  Avoid that triggering LUN referesh concurrently with device deletion
  triggers the following:
  
  general protection fault: 0000 [#1]
  Workqueue: events vdev_inq_changed_fn [scst_vdisk]
  Call Trace:
   _raw_spin_lock_bh+0x2b/0x30
   scst_cm_update_dev+0x87/0x190 [scst]
   scst_dev_inquiry_data_changed+0xfb/0x1b0 [scst]
   vdev_inq_changed_fn+0x60/0x120 [scst_vdisk]
   process_one_work+0x14d/0x410
   worker_thread+0x66/0x460
   kthread+0xdb/0x100
   ret_from_fork+0x3f/0x70
  
  Reported-by: Jinpu Wang <jinpu.wang@profitbricks.com>
  Tested-by: Jinpu Wang <jinpu.wang@profitbricks.com>
........
  r7104 | vlnb | 2017-03-07 20:36:45 -0800 (Tue, 07 Mar 2017) | 5 lines
  
  Linux kernel v4.10 build fix.
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
  r7106 | bvassche | 2017-04-11 11:48:36 -0700 (Tue, 11 Apr 2017) | 4 lines
  
  ib_srpt: Ensure that the BUG_ON() argument has no side effects
  
  Reported-by: David Butterfield <dab21774@gmail.com>
........
  r7107 | vlnb | 2017-04-13 15:04:07 -0700 (Thu, 13 Apr 2017) | 7 lines
  
  The argument to sleep() would get "promoted" to an integer with value zero.
  -               sleep(0.1);
  +               usleep(100*1000);
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7108 | vlnb | 2017-04-13 15:30:25 -0700 (Thu, 13 Apr 2017) | 6 lines
  
  create_and_open_dev() returns a (-errno), so the "if (iser_fd...)" check should
  detect *any* negative return value as a case when fd should be set to -1.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7109 | vlnb | 2017-04-13 15:38:38 -0700 (Thu, 13 Apr 2017) | 8 lines
  
  Change memcpy() to strncpy() because the source name string is not guaranteed
  to exist as valid addressable memory beyond the NULL byte.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
  
  with small addition to force set last byte NULL
........
  r7110 | vlnb | 2017-04-13 16:02:18 -0700 (Thu, 13 Apr 2017) | 7 lines
  
  Thre is potential buffer overflow in iscsi_session_alloc() due to
  short computation of needed string size.  Notice the "%s@%s" in the first call
  to sprintf().
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7111 | vlnb | 2017-04-13 16:12:46 -0700 (Thu, 13 Apr 2017) | 8 lines
  
  iscsi: avoid a crash in iscsi_extracheck_is_rd_thread()
  
  Add an extra check in iscsi_extracheck_is_rd_thread() to avoid a crash when
  conn->rd_task is NULL.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7115 | vlnb | 2017-04-13 16:37:13 -0700 (Thu, 13 Apr 2017) | 12 lines
  
  scst: fix memory leak in scst_proc_group_add()
  
  Valgrind noticed that the "name" allocated in scst_proc_group_add() was
  leaking.  It turns out that scst_alloc_add_acg makes its own copy of the name
  passed to it from this code, making the string duplication done here redundant
  (and leaky).  The change eliminates the string duplication (along with all its
  associated error handling logic) and simply passes the (unowned) incoming
  string down for duplication below.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7116 | vlnb | 2017-04-13 16:39:14 -0700 (Thu, 13 Apr 2017) | 7 lines
  
  scst_vdisk: fix memory leak in vdisk_write_proc()
  
  Another leak valgrind popped out, this one in vdisk_write_proc().
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7117 | vlnb | 2017-04-13 16:41:14 -0700 (Thu, 13 Apr 2017) | 9 lines
  
  scst: take scst_mutex before calling scst_del_free_acg() in exit_scst()
  
  scst_del_free_acg() does lockdep_assert_held(&scst_mutex), so we'd better take
  the lock before calling it.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7118 | vlnb | 2017-04-13 16:42:51 -0700 (Thu, 13 Apr 2017) | 8 lines
  
  scst: take scst_mutex before calling scst_del_free_acg() in scst_proc_cleanup_module()
  
  Take lock before a call that ends up at the lockdep_assert_held() in
  scst_del_free_acg() without locking.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7125 | vlnb | 2017-04-13 18:17:45 -0700 (Thu, 13 Apr 2017) | 6 lines
  
  extraclean does "rm tags cscope.out"
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7134 | vlnb | 2017-04-17 20:57:12 -0700 (Mon, 17 Apr 2017) | 5 lines
  
  iscsi-scst: replace strncpy() by strlcpy()
  
  Follow up for r7109: strlcpy() is more appropriate in this place.
........
  r7135 | vlnb | 2017-04-17 21:02:44 -0700 (Mon, 17 Apr 2017) | 5 lines
  
  fcst: Linux kernel v4.10 build fix
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
  r7136 | vlnb | 2017-04-17 21:06:18 -0700 (Mon, 17 Apr 2017) | 5 lines
  
  scst: avoid possible side effect with WARN_ON_ONCE()
  
  Reported-By: David Butterfield <dab21774@gmail.com>
........
  r7137 | vlnb | 2017-04-18 20:44:20 -0700 (Tue, 18 Apr 2017) | 5 lines
  
  fileio_tgt: change "#if DEBUG_TM_FN_IGNORE" to "#ifdef ..."
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7139 | vlnb | 2017-04-20 18:02:25 -0700 (Thu, 20 Apr 2017) | 7 lines
  
  iscsi-scstd: replace signal() with sigaction()
  
  Replace signal() with sigaction() for validity in a multithreaded process
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7141 | vlnb | 2017-04-20 18:11:37 -0700 (Thu, 20 Apr 2017) | 7 lines
  
  scst: set file size for NULLIO in PROCFS build
  
  The file size wasn't getting set for NULLIO with /proc support
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7143 | vlnb | 2017-04-20 18:32:07 -0700 (Thu, 20 Apr 2017) | 9 lines
  
  iscsi-scst: fix ENOMEM path
  
  In an error path in iscsi_threads_pool_get(), when a new pool cannot be
  allocated, if there is a pool on iscsi_thread_pools_list, it passes that back as
  an alternative, so return zero in that case.
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7152 | bvassche | 2017-04-26 16:53:11 -0700 (Wed, 26 Apr 2017) | 5 lines
  
  scst: Introduce scst_scsi_execute()
  
  This patch does not change any functionality but makes it easier
  to port SCST to Linux kernel v4.11.
........
  r7153 | bvassche | 2017-04-26 17:17:22 -0700 (Wed, 26 Apr 2017) | 1 line
  
  scst: Port to Linux kernel v4.11
........
  r7154 | vlnb | 2017-04-28 17:58:55 -0700 (Fri, 28 Apr 2017) | 5 lines
  
  scst: create proc/scst_threads with mode S_IRUGO, not 0
  
  Signed-off-by: David Butterfield <dab21774@gmail.com>
........
  r7158 | bvassche | 2017-05-01 14:01:33 -0700 (Mon, 01 May 2017) | 1 line
  
  scst: Kernel v4.12 build fixes
........
  r7162 | bvassche | 2017-05-02 07:13:15 -0700 (Tue, 02 May 2017) | 1 line
  
  scst_lib: Fix kernel 2.6.30 build
........
  r7163 | bvassche | 2017-05-02 07:23:00 -0700 (Tue, 02 May 2017) | 1 line
  
  scst: Fix build for kernels before v2.6.39
........
  r7168 | bvassche | 2017-05-03 19:56:27 -0700 (Wed, 03 May 2017) | 1 line
  
  scst: Fix build for kernels before v2.6.39
........
  r7169 | vlnb | 2017-05-05 18:31:59 -0700 (Fri, 05 May 2017) | 3 lines
  
  scst: nolockdep patch for kernel 4.9
........
  r7170 | vlnb | 2017-05-10 20:51:32 -0700 (Wed, 10 May 2017) | 3 lines
  
  qla2x00t: update to kernel 4.10
........
  r7171 | vlnb | 2017-05-10 20:52:51 -0700 (Wed, 10 May 2017) | 3 lines
  
  scst: nolockdep patch for kernel 4.10
........
  r7173 | vlnb | 2017-05-10 21:00:29 -0700 (Wed, 10 May 2017) | 7 lines
  
  fcst: Linux kernel v4.11 build fix
  
  Linux kernel v4.11 build fix.
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
  r7175 | bvassche | 2017-05-13 17:42:24 -0700 (Sat, 13 May 2017) | 4 lines
  
  scst/include/backport.h: Remove duplicate definition of kthread_create_on_node()
  
  This patch reverts most of r7168.
........
  r7176 | bvassche | 2017-05-13 17:55:39 -0700 (Sat, 13 May 2017) | 1 line
  
  scst/include/backport.h: Add a comment
........
  r7177 | bvassche | 2017-05-13 19:55:24 -0700 (Sat, 13 May 2017) | 1 line
  
  scst/include/backport.h: Fix kthread_create_on_node() definition
........
  r7178 | bvassche | 2017-05-13 20:06:54 -0700 (Sat, 13 May 2017) | 4 lines
  
  scst/include/backport.h: Add a kref_read() backport
  
  This patch does not change any functionality.
........
  r7179 | bvassche | 2017-05-13 20:13:56 -0700 (Sat, 13 May 2017) | 4 lines
  
  scst/include/backport.h: Add a backport of rcu_dereference_protected()
  
  This patch does not change any functionality.
........
  r7185 | bvassche | 2017-05-14 11:56:09 -0700 (Sun, 14 May 2017) | 14 lines
  
  scst_local: Fix a race condition
  
  Avoid that the following crash can occur:
  
  general protection fault: 0000 [#1] PREEMPT SMP
  RIP: 0010:scsi_is_host_device+0x7/0x20 [scsi_mod]
  Call Trace:
   scst_process_aens+0x95/0x1d0 [scst_local]
   scst_aen_work_fn+0x6f/0x120 [scst_local]
   process_one_work+0x20b/0x6c0
   worker_thread+0x4e/0x4a0
   kthread+0x113/0x150
   ret_from_fork+0x31/0x40
........
  r7190 | vlnb | 2017-05-19 20:00:28 -0700 (Fri, 19 May 2017) | 8 lines
  
  scst: fix possible NULL dereference in TM code
  
  TM command accessing a non-existing LUN might lead NULL dereference in
  scst_call_dev_task_mgmt_fn_done().
  
  Reported-By: <Ilan Steinberg <ilan.steinberg@kaminario.com>>
........
  r7193 | vlnb | 2017-05-22 19:23:38 -0700 (Mon, 22 May 2017) | 5 lines
  
  qla2x00t: fix broken 4.9 kernels build
  
  Reported-By: Marc Smith <marc.smith@parodyne.com>
........
  r7203 | vlnb | 2017-06-02 19:38:51 -0700 (Fri, 02 Jun 2017) | 3 lines
  
  Update to 4.11 kernels
........
  r7208 | vlnb | 2017-06-12 20:58:26 -0700 (Mon, 12 Jun 2017) | 5 lines
  
  scst: Linux kernel v4.12 warning fix.
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-07-14 00:17:31 +00:00

550 lines
19 KiB
Makefile

#
# Common makefile for SCSI target mid-level and its drivers
#
# Copyright (C) 2004 - 2016 Vladislav Bolkhovitin <vst@vlnb.net>
# Copyright (C) 2007 - 2016 SanDisk Corporation
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2
# of the License.
#
# 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 for more details.
#
#
SHELL = /bin/bash
# Define the location to the kernel src. Can be defined here or on
# the command line during the build process. If KDIR is defined,
# we will determine an appropriate value for KVER from the kernel
# source tree. KVER can still be overridden by the user via the
# command line or by defining it in this Makefile. If KDIR and KVER
# are not defined by the user, the current running kernel version is
# used to define KVER.
#export KDIR=/usr/src/linux-2.6
#export KVER=2.6.x
ifdef KDIR
ifndef KVER
export KVER = $(strip $(shell \
cat $(KDIR)/include/config/kernel.release 2>/dev/null || \
make -s -C $(KDIR) kernelversion))
endif
endif
SCST_DIR=scst
DOC_DIR=doc
SCSTADM_DIR=scstadmin
QLA_INI_DIR=qla2x00t_git
QLA_DIR=qla2x00t_git/qla2x00-target
QLA_OLD_INI_DIR=qla2x00t
QLA_OLD_DIR=qla2x00t/qla2x00-target
LSI_DIR=mpt
USR_DIR=usr
SRP_DIR=srpt
SCST_LOCAL_DIR=scst_local
MVSAS_DIR=mvsas_tgt
FCST_DIR=fcst
EMULEX_DIR=emulex
ISCSI_DIR=iscsi-scst
REVISION ?= $(shell if svn info >/dev/null 2>&1; \
then svn info | sed -n 's/^Revision:[[:blank:]]*//p';\
else git log | grep -c ^commit; \
fi)
VERSION = $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h).$(REVISION)")
help:
@echo " all : make all"
@echo " clean : clean files"
@echo " extraclean : clean + clean dependencies"
@echo " install : install"
@echo " uninstall : uninstall"
@echo ""
@echo " scst : make scst only"
@echo " scst_clean : scst: clean "
@echo " scst_extraclean : scst: clean + clean dependencies"
@echo " scst_install : scst: install"
@echo " scst_uninstall : scst: uninstall"
@echo ""
@echo " scstadm_install : scstadmin: install"
@echo " scstadm_uninstall : scstadmin: uninstall"
@echo ""
@echo " qla : make QLA target driver"
@echo " qla_pull : pull the latest version of the QLA target driver from the QLogic's git"
@echo " qla_clean : qla target: clean "
@echo " qla_extraclean : qla target: clean + clean dependencies"
@echo " qla_install : qla target: install"
@echo " qla_uninstall : qla target: uninstall"
@echo ""
@echo " qla_old : make old Qlogic chipsets target driver"
@echo " qla_old_clean : qla old target: clean "
@echo " qla_old_extraclean: qla old target: clean + clean dependencies"
@echo " qla_old_install : qla old target: install"
@echo " qla_old_uninstall : qla old target: uninstall"
@echo ""
@echo " iscsi : make iSCSI target"
@echo " iscsi_clean : ISCSI target: clean "
@echo " iscsi_extraclean : ISCSI target: clean + clean dependencies"
@echo " iscsi_install : ISCSI target: install"
@echo " iscsi_uninstall : ISCSI target: uninstall"
@echo ""
@echo " emulex : make Emulex target"
@echo " emulex_clean : Emulex target: clean "
@echo " emulex_extraclean : Emulex target: clean + clean dependencies"
@echo " emulex_install : Emulex target: install"
@echo " emulex_uninstall : Emulex target: uninstall"
@echo ""
@echo " lsi : make LSI MPT target"
@echo " lsi_clean : lsi target: clean "
@echo " lsi_extraclean : lsi target: clean + clean dependencies"
@echo " lsi_install : lsi target: install"
@echo " lsi_uninstall : lsi target: uninstall"
@echo ""
@echo " srpt : make SRP target"
@echo " srpt_clean : srp target: clean "
@echo " srpt_extraclean : srp target: clean + clean dependencies"
@echo " srpt_install : srp target: install"
@echo " srpt_uninstall : srp target: uninstall"
@echo ""
@echo " mvsas : make MVSAS target"
@echo " mvsas_clean : mvsas target: clean "
@echo " mvsas_extraclean : mvsas target: clean + clean dependencies"
@echo " mvsas_install : mvsas target: install"
@echo " mvsas_uninstall : mvsas target: uninstall"
@echo ""
@echo " fcst : make FCoE target"
@echo " fcst_clean : FCoE target: clean "
@echo " fcst_extraclean : FCoE target: clean + clean dependencies"
@echo " fcst_install : FCoE target: install"
@echo " fcst_uninstall : FCoE target: uninstall"
@echo ""
@echo " scst_local : make scst_local target"
@echo " scst_local_install : scst_local target: install"
@echo " scst_local_uninstall : scst_local target: uninstall"
@echo ""
@echo " usr : make user space targets"
@echo " usr_clean : usr target: clean "
@echo " usr_extraclean : usr target: clean + clean dependencies"
@echo " usr_install : usr target: install"
@echo " usr_uninstall : usr target: uninstall"
@echo ""
@echo " enable_proc : switch to procfs interface"
@echo " disable_proc : switch to sysfs interface (default)"
@echo ""
@echo " 2perf : changes debug state to full performance"
@echo " 2release : changes debug state to release"
@echo " 2debug : changes debug state to full debug"
@echo ""
@echo " Note:"
@echo " - install and uninstall may need root privileges"
all:
cd $(SCST_DIR) && $(MAKE) $@
# @if [ -d $(DOC_DIR) ]; then cd $(DOC_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; else if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi fi
# @if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
# @if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(EMULEX_DIR) ]; then cd $(EMULEX_DIR) && $(MAKE) $@; fi
install:
cd $(SCST_DIR) && $(MAKE) $@
# @if [ -d $(DOC_DIR) ]; then cd $(DOC_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; else if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi fi
# @if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
# @if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(EMULEX_DIR) ]; then cd $(EMULEX_DIR) && $(MAKE) $@; fi
uninstall:
cd $(SCST_DIR) && $(MAKE) $@
# @if [ -d $(DOC_DIR) ]; then cd $(DOC_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; else if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi fi
# @if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(EMULEX_DIR) ]; then cd $(EMULEX_DIR) && $(MAKE) $@; fi
clean:
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(DOC_DIR) ]; then cd $(DOC_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_INI_DIR) ]; then cd $(QLA_INI_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_INI_DIR) ]; then cd $(QLA_OLD_INI_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(EMULEX_DIR) ]; then cd $(EMULEX_DIR) && $(MAKE) $@; fi
extraclean:
-rm -f TAGS tags cscope.out
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(DOC_DIR) ]; then cd $(DOC_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_INI_DIR) ]; then cd $(QLA_INI_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_INI_DIR) ]; then cd $(QLA_OLD_INI_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(EMULEX_DIR) ]; then cd $(EMULEX_DIR) && $(MAKE) $@; fi
tags:
find . -type f -name "*.[ch]" | ctags --c-kinds=+p --fields=+iaS --extra=+q -e -L-
scst:
cd $(SCST_DIR) && $(MAKE) all
scst_install:
cd $(SCST_DIR) && $(MAKE) install
scst_uninstall:
cd $(SCST_DIR) && $(MAKE) uninstall
scst_clean:
cd $(SCST_DIR) && $(MAKE) clean
scst_extraclean:
cd $(SCST_DIR) && $(MAKE) extraclean
docs:
cd $(DOC_DIR) && $(MAKE) all
docs_clean:
cd $(DOC_DIR) && $(MAKE) clean
docs_extraclean:
cd $(DOC_DIR) && $(MAKE) extraclean
scstadm:
cd $(SCSTADM_DIR) && $(MAKE) all
scstadm_install:
cd $(SCSTADM_DIR) && $(MAKE) install
scstadm_uninstall:
cd $(SCSTADM_DIR) && $(MAKE) uninstall
scstadm_clean:
cd $(SCSTADM_DIR) && $(MAKE) clean
scstadm_extraclean:
cd $(SCSTADM_DIR) && $(MAKE) extraclean
qla:
cd $(QLA_DIR) && $(MAKE) all
qla_pull:
cd $(QLA_INI_DIR) && git pull
qla_install:
cd $(QLA_DIR) && $(MAKE) install
qla_uninstall:
cd $(QLA_DIR) && $(MAKE) uninstall
qla_clean:
cd $(QLA_INI_DIR) && $(MAKE) clean
cd $(QLA_DIR) && $(MAKE) clean
qla_extraclean:
cd $(QLA_INI_DIR) && pwd && $(MAKE) extraclean
cd $(QLA_DIR) && $(MAKE) extraclean
qla_old:
cd $(QLA_OLD_DIR) && $(MAKE) all
qla_old_install:
cd $(QLA_OLD_DIR) && $(MAKE) install
qla_old_uninstall:
cd $(QLA_OLD_DIR) && $(MAKE) uninstall
qla_old_clean:
cd $(QLA_OLD_DIR) && $(MAKE) clean
qla_old_extraclean:
cd $(QLA_OLD_DIR) && $(MAKE) extraclean
iscsi:
cd $(ISCSI_DIR) && $(MAKE) all
iscsi_install:
cd $(ISCSI_DIR) && $(MAKE) install
iscsi_uninstall:
cd $(ISCSI_DIR) && $(MAKE) uninstall
iscsi_clean:
cd $(ISCSI_DIR) && $(MAKE) clean
iscsi_extraclean:
cd $(ISCSI_DIR) && $(MAKE) extraclean
emulex:
cd $(EMULEX_DIR) && $(MAKE) all
emulex_install:
cd $(EMULEX_DIR) && $(MAKE) install
emulex_uninstall:
cd $(EMULEX_DIR) && $(MAKE) uninstall
emulex_clean:
cd $(EMULEX_DIR) && $(MAKE) clean
emulex_extraclean:
cd $(EMULEX_DIR) && $(MAKE) extraclean
lsi:
cd $(LSI_DIR) && $(MAKE) all
lsi_install:
cd $(LSI_DIR) && $(MAKE) install
lsi_uninstall:
cd $(LSI_DIR) && $(MAKE) uninstall
lsi_clean:
cd $(LSI_DIR) && $(MAKE) clean
lsi_extraclean:
cd $(LSI_DIR) && $(MAKE) extraclean
srpt:
cd $(SRP_DIR) && $(MAKE) all
srpt_install:
cd $(SRP_DIR) && $(MAKE) install
srpt_uninstall:
cd $(SRP_DIR) && $(MAKE) uninstall
srpt_clean:
cd $(SRP_DIR) && $(MAKE) clean
srpt_extraclean:
cd $(SRP_DIR) && $(MAKE) extraclean
scst_local:
cd $(SCST_LOCAL_DIR) && $(MAKE) all
scst_local_install:
cd $(SCST_LOCAL_DIR) && $(MAKE) install
scst_local_uninstall:
cd $(SCST_LOCAL_DIR) && $(MAKE) uninstall
scst_local_clean:
cd $(SCST_LOCAL_DIR) && $(MAKE) clean
scst_local_extraclean:
cd $(SCST_LOCAL_DIR) && $(MAKE) extraclean
usr:
cd $(USR_DIR) && $(MAKE)
usr_install:
cd $(USR_DIR) && $(MAKE) install
usr_uninstall:
cd $(USR_DIR) && $(MAKE) uninstall
usr_clean:
cd $(USR_DIR) && $(MAKE) clean
usr_extraclean:
cd $(USR_DIR) && $(MAKE) extraclean
mvsas:
cd $(MVSAS_DIR) && $(MAKE) all
mvsas_install:
cd $(MVSAS_DIR) && $(MAKE) install
mvsas_uninstall:
cd $(MVSAS_DIR) && $(MAKE) uninstall
mvsas_clean:
cd $(MVSAS_DIR) && $(MAKE) clean
mvsas_extraclean:
cd $(MVSAS_DIR) && $(MAKE) extraclean
fcst:
cd $(FCST_DIR) && $(MAKE) all
fcst_install:
cd $(FCST_DIR) && $(MAKE) install
fcst_uninstall:
cd $(FCST_DIR) && $(MAKE) uninstall
fcst_clean:
cd $(FCST_DIR) && $(MAKE) clean
fcst_extraclean:
cd $(FCST_DIR) && $(MAKE) extraclean
scst-dist-gzip:
name=scst && \
mkdir $${name}-$(VERSION) && \
{ \
if [ -e qla2x00t_git ]; then \
scripts/list-source-files | grep -v ^qla2x00t/; \
( dir="$$PWD" && cd qla2x00t_git && \
"$$dir/scripts/list-source-files" ) | \
sed 's,^,qla2x00t_git/,'; \
else \
scripts/list-source-files; \
fi | \
grep -E '^doc/|^fcst/|^iscsi-scst/|^Makefile|^qla2x00t(|_git)/|^scst.spec|^scst/|^scst_local/|^srpt/|^usr/|^scstadmin/'|\
tar -T- -cf- | \
tar -C $${name}-$(VERSION) -xf-; \
} && \
rm -f $${name}-$(VERSION).tar.bz2 && \
tar -cjf $${name}-$(VERSION).tar.bz2 $${name}-$(VERSION) && \
rm -rf $${name}-$(VERSION)
scst-rpm:
name=scst && \
rpmtopdir="$$(if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)" && \
$(MAKE) scst-dist-gzip && \
for d in BUILD RPMS SOURCES SPECS SRPMS; do \
mkdir -p $${rpmtopdir}/$$d; \
done && \
cp scst-$(VERSION).tar.bz2 $${rpmtopdir}/SOURCES && \
sed "s/@rpm_version@/$(VERSION)/g" \
<$${name}.spec.in >$${name}.spec && \
MAKE="$(MAKE)" rpmbuild --define="%_topdir $${rpmtopdir}" \
$(if $(KVER),--define="%kversion $(KVER)") \
-ba $${name}.spec && \
rm -f $${name}-$(VERSION).tar.bz2
scst-dkms-rpm:
name=scst-dkms && \
rpmtopdir="$$(if [ $$(id -u) = 0 ]; then echo /usr/src/packages;\
else echo $$PWD/rpmbuilddir; fi)" && \
$(MAKE) scst-dist-gzip && \
for d in BUILD RPMS SOURCES SPECS SRPMS; do \
mkdir -p $${rpmtopdir}/$$d; \
done && \
cp scst-$(VERSION).tar.bz2 $${rpmtopdir}/SOURCES && \
sed "s/@rpm_version@/$(VERSION)/g" \
<$${name}.spec.in >$${name}.spec && \
MAKE="$(MAKE)" rpmbuild --define="%_topdir $${rpmtopdir}" \
$(if $(KVER),--define="%kversion $(KVER)") \
$(if $(KDIR),--define="%kdir $(KDIR)") \
-ba $${name}.spec && \
rm -f $${name}-$(VERSION).tar.bz2
rpm:
$(MAKE) scst-rpm
$(MAKE) -C scstadmin rpm
@if [ "$$(id -u)" != 0 ]; then \
echo; \
echo "The following RPMs have been built:"; \
find -name '*.rpm'; \
fi
release-archive:
$(MAKE) 2release
for m in $$(find -name Makefile | \
xargs grep -l '^release-archive:' | \
grep -v '^\./Makefile'); \
do \
(cd $$(dirname $$m) && $(MAKE) release-archive) \
done
$(MAKE) 2debug
2perf: extraclean
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
2release: extraclean
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
2debug: extraclean
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
@if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
@if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi
@if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(FCST_DIR) ]; then cd $(FCST_DIR) && $(MAKE) $@; fi
enable_proc: extraclean
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
# @if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
# @if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(SCSTADM_DIR) ]; then cd $(SCSTADM_DIR) && $(MAKE) $@; fi
disable_proc: extraclean
cd $(SCST_DIR) && $(MAKE) $@
@if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi
@if [ -d $(QLA_OLD_DIR) ]; then cd $(QLA_OLD_DIR) && $(MAKE) $@; fi
# @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi
# @if [ -d $(SRP_DIR) ]; then cd $(SRP_DIR) && $(MAKE) $@; fi
@if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi
# @if [ -d $(SCST_LOCAL_DIR) ]; then cd $(SCST_LOCAL_DIR) && $(MAKE) $@; fi
@if [ -d $(SCSTADM_DIR) ]; then cd $(SCSTADM_DIR) && $(MAKE) $@; fi
.PHONY: all install uninstall clean extraclean tags help \
qla qla_install qla_uninstall qla_clean qla_extraclean \
qla_old qla_old_install qla_old_uninstall qla_old_clean qla_old_extraclean \
lsi lsi_install lsi_uninstall lsi_clean lsi_extraclean \
iscsi iscsi_install iscsi_uninstall iscsi_clean iscsi_extraclean \
emulex emulex_install emulex_uninstall emulex_clean emulex_extraclean \
scst scst_install scst_uninstall scst_clean scst_extraclean \
docs docs_clean docs_extraclean \
scstadm scstadm_install scstadm_uninstall scstadm_clean scstadm_extraclean \
srpt srpt_install srpt_uninstall srpt_clean srpt_extraclean \
usr usr_install usr_uninstall usr_clean usr_extraclean \
scst_local scst_local_install scst_local_uninstall scst_local_clean scst_local_extraclean \
mvsas mvsas_install mvsas_uninstall mvsas_clean mvsas_extraclean \
fcst fcst_install fcst_uninstall fcst_clean fcst_extraclean \
2perf 2release 2debug enable_proc disable_proc