[x264-devel] [Git][videolan/x264][master] cli: Install bash autocomplete during 'make install'

Anton Mitrofanov gitlab at videolan.org
Thu Jul 2 19:30:08 CEST 2020



Anton Mitrofanov pushed to branch master at VideoLAN / x264


Commits:
a41d4e29 by Henrik Gramner at 2020-07-02T19:20:21+02:00
cli: Install bash autocomplete during 'make install'

- - - - -


2 changed files:

- Makefile
- configure


Changes:

=====================================
Makefile
=====================================
@@ -388,6 +388,10 @@ distclean: clean
 install-cli: cli
 	$(INSTALL) -d $(DESTDIR)$(bindir)
 	$(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
+ifneq ($(BASHCOMPLETIONSDIR),)
+	$(INSTALL) -d $(DESTDIR)$(BASHCOMPLETIONSDIR)
+	$(INSTALL) -m 644 -T $(SRCPATH)/tools/bash-autocomplete.sh $(DESTDIR)$(BASHCOMPLETIONSDIR)/x264
+endif
 
 install-lib-dev:
 	$(INSTALL) -d $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig
@@ -418,6 +422,9 @@ ifneq ($(IMPLIBNAME),)
 else ifneq ($(SONAME),)
 	rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
 endif
+ifneq ($(BASHCOMPLETIONSDIR),)
+	rm -f $(DESTDIR)$(BASHCOMPLETIONSDIR)/x264
+endif
 
 etags TAGS:
 	etags $(SRCS) $(SRCS_X) $(SRCS_8)


=====================================
configure
=====================================
@@ -1528,6 +1528,9 @@ fi
 if [ "$cli" = "yes" ]; then
     echo 'default: cli' >> config.mak
     echo 'install: install-cli' >> config.mak
+    if pkg_check bash-completion ; then
+        echo "BASHCOMPLETIONSDIR=$($PKGCONFIG --variable=completionsdir bash-completion)" >> config.mak
+    fi
 fi
 
 if [ "$shared" = "yes" ]; then



View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/a41d4e29445d20df5ca2c12cd9aa8754b813fe03

-- 
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/a41d4e29445d20df5ca2c12cd9aa8754b813fe03
You're receiving this email because of your account on code.videolan.org.




More information about the x264-devel mailing list