Skip to content

Commit 2a838dd

Browse files
eli-schwartzscop
authored andcommitted
build: don't install BSD specific completions on non-BSD platforms
Various programs are only available on BSD platforms, mainly FreeBSD. Avoid installing them where they don't make sense, for similar reasons as the pkgutil change.
1 parent 8cf1283 commit 2a838dd

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

completions/Makefile.am

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ bashcomp_DATA = 2to3 \
120120
firefox \
121121
flake8 \
122122
_flamegraph \
123-
freebsd-update \
124123
freeciv \
125124
freeciv-server \
126125
function \
@@ -215,8 +214,6 @@ bashcomp_DATA = 2to3 \
215214
_keyring \
216215
kill \
217216
killall \
218-
kldload \
219-
kldunload \
220217
koji \
221218
_kontena \
222219
ktutil \
@@ -324,7 +321,6 @@ bashcomp_DATA = 2to3 \
324321
_pipenv \
325322
pkg-config \
326323
pkg-get \
327-
pkg_delete \
328324
pkgadd \
329325
pkgrm \
330326
pkgtool \
@@ -333,9 +329,6 @@ bashcomp_DATA = 2to3 \
333329
pm-is-supported \
334330
pm-powersave \
335331
pngfix \
336-
portinstall \
337-
portsnap \
338-
portupgrade \
339332
postcat \
340333
postconf \
341334
postfix \
@@ -507,6 +500,21 @@ if SOLARIS
507500
bashcomp_DATA += pkgutil
508501
endif
509502

503+
if BSD
504+
bashcomp_DATA += pkg_delete
505+
endif
506+
507+
if FREEBSD
508+
bashcomp_DATA += \
509+
freebsd-update \
510+
kldload \
511+
kldunload \
512+
portinstall \
513+
portsnap \
514+
portupgrade
515+
endif
516+
517+
510518
EXTRA_DIST = $(bashcomp_DATA)
511519

512520
CLEANFILES = \
@@ -770,8 +778,6 @@ CLEANFILES = \
770778
ping4 \
771779
ping6 \
772780
_pip3 \
773-
pkg_deinstall \
774-
pkg_info \
775781
pkgconf \
776782
pkill \
777783
plzip \
@@ -1159,8 +1165,10 @@ symlinks: $(DATA)
11591165
_black _blackd _flask _httpx
11601166
$(ss) pkg-config \
11611167
pkgconf
1168+
if BSD
11621169
$(ss) pkg_delete \
11631170
pkg_deinstall pkg_info
1171+
endif
11641172
$(ss) pgrep \
11651173
pkill
11661174
$(ss) pm-hibernate \

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,22 @@ fi
1414

1515
AC_CANONICAL_HOST
1616

17+
build_bsd=
18+
build_freebsd=
1719
build_solaris=
1820
case ${host_os} in
21+
*bsd*)
22+
build_bsd=yes
23+
case ${host_os} in
24+
*freebsd*)
25+
build_freebsd=yes ;;
26+
esac ;;
1927
*solaris*)
2028
build_solaris=yes ;;
2129
esac
2230

31+
AM_CONDITIONAL([BSD], [test "${build_bsd}" = yes])
32+
AM_CONDITIONAL([FREEBSD], [test "${build_freebsd}" = yes])
2333
AM_CONDITIONAL([SOLARIS], [test "${build_solaris}" = yes])
2434

2535
AC_CONFIG_FILES([

0 commit comments

Comments
 (0)