From: Benjamin Y. <ben...@rq...> - 2010-07-27 02:19:01
|
> Could you evaluate a bit more for what those changes are needed? I > can't see logic behind them. sorry, i'll do each with comments. diff -ur a/scst/src/Makefile c/scst/src/Makefile --- a/scst/src/Makefile 2010-07-25 01:32:30.000000000 +0000 +++ c/scst/src/Makefile 2010-07-25 22:06:17.000000000 +0000 @@ -70,8 +70,10 @@ install: all -rm -f $(INSTALL_DIR)/scsi_tgt.ko - $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd) BUILD_DEV=m \ - modules_install + install -d $(INSTALL_DIR) + install -d $(INSTALL_DIR)/dev_handlers + install -m 644 dev_handlers/*.ko $(INSTALL_DIR)/dev_handlers + install -m 644 scst.ko $(INSTALL_DIR) install -d $(INSTALL_DIR_H) install -m 644 ../include/scst.h $(INSTALL_DIR_H) install -m 644 ../include/scst_sgv.h $(INSTALL_DIR_H) it wasn't immediately obvious how to get modules_install to put output in DESTDIR. looks like you use O= variable but this made alot of noise and didn't do as expected. i replaced it with the calls to install. trivial. @@ -87,7 +89,7 @@ install -m 644 Module.symvers $(INSTALL_DIR_H) endif -/sbin/depmod -a $(KVER) - mkdir -p /var/lib/scst/pr + mkdir -p $(DESTDIR)/var/lib/scst/pr easy fix here? diff -ur a/scstadmin/scstadmin.procfs/Makefile c/scstadmin/scstadmin.procfs/Makefile --- a/scstadmin/scstadmin.procfs/Makefile 2010-07-25 01:32:20.000000000 +0000 +++ c/scstadmin/scstadmin.procfs/Makefile 2010-07-25 22:07:06.000000000 +0000 @@ -5,8 +5,9 @@ all: perl-module -install: +install: all $(MAKE) -C scst-$(MODULE_VERSION) install + install -d $(DESTDIR)$(SBINDIR) install -m 755 $(TOOL) $(DESTDIR)$(SBINDIR) seemed to me that install should depend on 'all', and since i was building each scst part separately, sbindir did not exist yet on first run. because of this, you get scstadmin copied to "sbin". same stuff in the sysfs makefile. as for my other comments, i'm just saying that i did not see the ISCSI_DESTDIR variable in the outermost makefile which was clobbering the DESTDIR i passed to make. it's not that important, just saves someone 15 minutes of debugging when expecting destdir to perform as expected. and for also2, most scripts use PREFIX to set /usr/ or /usr/local/. instead in the scst scripts there are 3 (INSTALL_DIR, INSTALL_DIR_H, others?) vars to modify the destination paths. again, no big deal really. nothing to lose sleep over. :) thanks -benjamin |