Skip to content

Commit b9c8bdf

Browse files
authored
Merge pull request #1214 from scop/pkgutil-automake
build: don't install various tools on non-applicable platforms
2 parents 165bd32 + 2a838dd commit b9c8bdf

File tree

2 files changed

+43
-10
lines changed

2 files changed

+43
-10
lines changed

completions/Makefile.am

Lines changed: 22 additions & 10 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,19 +321,14 @@ bashcomp_DATA = 2to3 \
324321
_pipenv \
325322
pkg-config \
326323
pkg-get \
327-
pkg_delete \
328324
pkgadd \
329325
pkgrm \
330326
pkgtool \
331-
pkgutil \
332327
plague-client \
333328
pm-hibernate \
334329
pm-is-supported \
335330
pm-powersave \
336331
pngfix \
337-
portinstall \
338-
portsnap \
339-
portupgrade \
340332
postcat \
341333
postconf \
342334
postfix \
@@ -503,6 +495,26 @@ bashcomp_DATA = 2to3 \
503495
zopfli \
504496
zopflipng
505497

498+
499+
if SOLARIS
500+
bashcomp_DATA += pkgutil
501+
endif
502+
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+
506518
EXTRA_DIST = $(bashcomp_DATA)
507519

508520
CLEANFILES = \
@@ -766,8 +778,6 @@ CLEANFILES = \
766778
ping4 \
767779
ping6 \
768780
_pip3 \
769-
pkg_deinstall \
770-
pkg_info \
771781
pkgconf \
772782
pkill \
773783
plzip \
@@ -1155,8 +1165,10 @@ symlinks: $(DATA)
11551165
_black _blackd _flask _httpx
11561166
$(ss) pkg-config \
11571167
pkgconf
1168+
if BSD
11581169
$(ss) pkg_delete \
11591170
pkg_deinstall pkg_info
1171+
endif
11601172
$(ss) pgrep \
11611173
pkill
11621174
$(ss) pm-hibernate \

configure.ac

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,27 @@ AC_ARG_WITH([pytest],[ --with-pytest=executable],[PYTEST="$withval"])
1111
if test "x$PYTEST" = x; then
1212
AC_CHECK_PROGS([PYTEST],[pytest pytest-3],[pytest])
1313
fi
14+
15+
AC_CANONICAL_HOST
16+
17+
build_bsd=
18+
build_freebsd=
19+
build_solaris=
20+
case ${host_os} in
21+
*bsd*)
22+
build_bsd=yes
23+
case ${host_os} in
24+
*freebsd*)
25+
build_freebsd=yes ;;
26+
esac ;;
27+
*solaris*)
28+
build_solaris=yes ;;
29+
esac
30+
31+
AM_CONDITIONAL([BSD], [test "${build_bsd}" = yes])
32+
AM_CONDITIONAL([FREEBSD], [test "${build_freebsd}" = yes])
33+
AM_CONDITIONAL([SOLARIS], [test "${build_solaris}" = yes])
34+
1435
AC_CONFIG_FILES([
1536
Makefile
1637
completions/Makefile

0 commit comments

Comments
 (0)