Skip to contentSkip to conversation

Makefile: provide separate install targets

PATCH In review Jeremy Kerr 2 participants 2 messages Jul 4, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: provide separate install targets

Currently make install will install the binaries, libraries and includes.

This change separates the install target into install-bin, install-lib and install-includes, so we have more flexibility, particularly when we're just using libfdt.

---
 Makefile |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
Makefile +10 -2
index 1169e6c..e64bf6b 100644
@@ -160,18 +160,26 @@ endif
 # intermediate target and building them again "for real"
 .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS)
 
-install: all $(SCRIPTS)
-	@$(VECHO) INSTALL
+install-bin: all $(SCRIPTS)
+	@$(VECHO) INSTALL-BIN
 	$(INSTALL) -d $(DESTDIR)$(BINDIR)
 	$(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+
+install-lib: all
+	@$(VECHO) INSTALL-LIB
 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
 	$(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
 	ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
 	ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
 	$(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
+
+install-includes:
+	@$(VECHO) INSTALL-INC
 	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
 	$(INSTALL) -m 644 $(LIBFDT_include) $(DESTDIR)$(INCLUDEDIR)
 
+install: install-bin install-lib install-includes
+
 $(VERSION_FILE): Makefile FORCE
 	$(call filechk,version)
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jeremy Kerr

Currently make install will install the binaries, libraries and includes.

This change separates the install target into install-bin, install-lib and install-includes, so we have more flexibility, particularly when we're just using libfdt.

Jon, please apply. Or pull from git://github.com/dgibson/dtc.git

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

_______________________________________________
devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss