Skip to contentSkip to conversation

tools/net/ynl: Makefile's install target now installs ynltool

PATCH Superseded Michel Lind 1 participant 2 messages Jan 15 – Jan 16

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/net/ynl: Makefile's install target now installs ynltool

This tool is built by default, but was not being installed by default when running make install. Fix this; it installs to $(prefix)/bin by default unless bindir is overridden.

---
 tools/net/ynl/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
tools/net/ynl/Makefile +5 -1
index c2f3e8b3f2ac..bf3f8b16170d 100644
@@ -4,6 +4,7 @@ include ../../scripts/Makefile.arch
 
 INSTALL	?= install
 prefix  ?= /usr
+bindir  ?= $(prefix)/bin
 ifeq ($(LP64), 1)
   libdir_relative = lib64
 else
@@ -41,13 +42,16 @@ clean distclean:
 	rm -rf pyynl.egg-info
 	rm -rf build
 
-install: libynl.a lib/*.h
+install: libynl.a lib/*.h ynltool
 	@echo -e "\tINSTALL libynl.a"
 	@$(INSTALL) -d $(DESTDIR)$(libdir)
 	@$(INSTALL) -m 0644 libynl.a $(DESTDIR)$(libdir)/libynl.a
 	@echo -e "\tINSTALL libynl headers"
 	@$(INSTALL) -d $(DESTDIR)$(includedir)/ynl
 	@$(INSTALL) -m 0644 lib/*.h $(DESTDIR)$(includedir)/ynl/
+	@echo -e "\tINSTALL ynltool"
+	@$(INSTALL) -d $(DESTDIR)$(bindir)
+	@$(INSTALL) -m 0755 ynltool/ynltool $(DESTDIR)$(bindir)/
 	@echo -e "\tINSTALL pyynl"
 	@pip install --prefix=$(DESTDIR)$(prefix) .
 	@make -C generated install
Signature · 7 lines
2.52.0


-- 
 _o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
     README:     https://fedoraproject.org/wiki/User:Salimma#README
#1 lore raw
Quoted 5 lines · Michel Lind

This tool is built by default, but was not being installed by default when running make install. Fix this; it installs to $(prefix)/bin by
default unless bindir is overridden.

Jakub pointed out ynltool has its own Makefile already, and it turns out it even has an install target. Per the process documentation I'll wait until 24 hours have passed, and then post a v2 that just delegates to this; it works fine when tested on a local build for CentOS Hyperscale.

Best regards,

Signature · 3 lines
 _o) Michel Lind
_( ) https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
     README:    https://fedoraproject.org/wiki/User:Salimma#README