]> git.proxmox.com Git - mirror_zfs.git/commit
Fix `make distclean` for `./configure --with-config=user
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 5 Apr 2011 20:13:01 +0000 (13:13 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 5 Apr 2011 20:33:28 +0000 (13:33 -0700)
commitd433c206515e567c52ce09589033405a0ae3716e
treeb3490a255f584a9e63bd6389033a5dcb750a8972
parentfa417e57a68b7aa026ec5fd8c0471b6c60ca109f
Fix `make distclean` for `./configure --with-config=user

    Making distclean in module
    make[1]: Entering directory `/zfs/module'
    make -C  SUBDIRS=`pwd`  clean
    make: Entering an unknown directory
    make: *** SUBDIRS=/zfs/module: No such file or directory.  Stop.

When using --with-config=user the 'distclean' target would fail
because it assumes the kernel configuration infrastrure is set up.
This is not the case, nor does it need to be, because the
'--with-config=user' option will prune the entire ./module subtree
from SUBDIRS.  This prevents most build rules from operating in the
./module directory.

However, the 'dist*' rules will still traverse this directory
because it is listed in DIST_SUBDIRS.  This is correct because we
need to ensure the dist rules package the directory contents
regardless of the configuration for the 'dist' rule.  The correct
way to handle this is to only invoke the kernel build system as
part of the 'clean' rule when CONFIG_KERNEL_TRUE is set.

Initial fix provided by Darik Horn <dajhorn@vanadac.com>.
This commit is a slightly refined form of the original.
module/Makefile.in