Skip to content

Commit b57c477

Browse files
committed
build: Include OS specific completions in tarball
This should fix scop#1282, although still doesn't deal with the issue of including tests for them or not.
1 parent 3e51b6c commit b57c477

File tree

2 files changed

+31
-22
lines changed

2 files changed

+31
-22
lines changed

completions/Makefile.am

+22-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
bashcompdir = $(datadir)/$(PACKAGE)/completions
2-
bashcomp_DATA = 2to3 \
1+
cross_platform = 2to3 \
32
7z \
43
a2x \
54
abook \
@@ -501,27 +500,37 @@ bashcomp_DATA = 2to3 \
501500
zopfli \
502501
zopflipng
503502

503+
solaris_extra = pkgutil
504504

505-
if SOLARIS
506-
bashcomp_DATA += pkgutil
507-
endif
508-
509-
if BSD
510-
bashcomp_DATA += pkg_delete
511-
endif
505+
bsd_extra = pkg_delete
512506

513-
if FREEBSD
514-
bashcomp_DATA += \
507+
freebsd_extra = \
515508
freebsd-update \
516509
kldload \
517510
kldunload \
518511
portinstall \
519512
portsnap \
520513
portupgrade
521-
endif
522514

515+
# We include all the files in the tarball
516+
EXTRA_DIST = $(bashcomp_DATA) \
517+
$(solaris_extra) \
518+
$(bsd_extra) \
519+
$(freebsd_extra)
523520

524-
EXTRA_DIST = $(bashcomp_DATA)
521+
bashcompdir = $(datadir)/$(PACKAGE)/completions
522+
bashcomp_DATA = $(cross_platform)
523+
# We add only the completions that are relevant for the current platform we're
524+
# installing on.
525+
if SOLARIS
526+
bashcomp_DATA += $(solaris_extra)
527+
endif
528+
if BSD
529+
bashcomp_DATA += $(bsd_extra)
530+
endif
531+
if FREEBSD
532+
bashcomp_DATA += $(freebsd_extra)
533+
endif
525534

526535
CLEANFILES = \
527536
7za \

configure.ac

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ fi
1414

1515
AC_CANONICAL_HOST
1616

17-
build_bsd=
18-
build_freebsd=
19-
build_solaris=
17+
install_bsd=
18+
install_freebsd=
19+
install_solaris=
2020
case ${host_os} in
2121
*bsd*)
22-
build_bsd=yes
22+
install_bsd=yes
2323
case ${host_os} in
2424
*freebsd*)
25-
build_freebsd=yes ;;
25+
install_freebsd=yes ;;
2626
esac ;;
2727
*solaris*)
28-
build_solaris=yes ;;
28+
install_solaris=yes ;;
2929
esac
3030

31-
AM_CONDITIONAL([BSD], [test "${build_bsd}" = yes])
32-
AM_CONDITIONAL([FREEBSD], [test "${build_freebsd}" = yes])
33-
AM_CONDITIONAL([SOLARIS], [test "${build_solaris}" = yes])
31+
AM_CONDITIONAL([BSD], [test "${install_bsd}" = yes])
32+
AM_CONDITIONAL([FREEBSD], [test "${install_freebsd}" = yes])
33+
AM_CONDITIONAL([SOLARIS], [test "${install_solaris}" = yes])
3434

3535
AC_CONFIG_FILES([
3636
Makefile

0 commit comments

Comments
 (0)