Makefile: Allow "make modules_install" to work from top-level directory.
authorBen Pfaff <blp@nicira.com>
Thu, 1 Nov 2012 20:54:20 +0000 (13:54 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 1 Nov 2012 20:54:20 +0000 (13:54 -0700)
INSTALL recommends running "make modules_install" but it didn't mention
that this has to be done from datapath/linux.  This commit makes this work
from the top-level build directory.

(Another solution would be to update INSTALL, but this approach seems a
little easier for the user.)

Signed-off-by: Ben Pfaff <blp@nicira.com>
Makefile.am

index dafba2b52312d68132f660a4131fd41600b24737..b71ca1fabc1dfcad09bb3adf3686234908de71c9 100644 (file)
@@ -211,6 +211,11 @@ install-data-local: $(INSTALL_DATA_LOCAL)
 uninstall-local: $(UNINSTALL_LOCAL)
 .PHONY: $(DIST_HOOKS) $(CLEAN_LOCAL) $(INSTALL_DATA_LOCAL) $(UNINSTALL_LOCAL)
 
+modules_install:
+if LINUX_ENABLED
+       cd datapath/linux && $(MAKE) modules_install
+endif
+
 include lib/automake.mk
 include ofproto/automake.mk
 include utilities/automake.mk