summary refs log tree commit diff
path: root/Completion/Debian/Command/_make-kpkg
blob: 252627a796ef7135ab865176ab58bb78c0e3e7f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#compdef make-kpkg

local curcontext="$curcontext" state line
typeset -A opt_args

_arguments -C \
   '--help[display help message]' \
   '--revision[change Debian revision number]:number:' \
   '--append-to-version[specify additional kernel sub-version]:suffix:' \
   '--added-modules[specify add-on modules]:module list:->addedmodules' \
   '--added-patches[specify additional patches]:patches list' \
   '--arch[specify architecture for cross-compilation]:architecture' \
   '--cross-compile[specify target string]:target' \
   '--subarch[specify subarchitecture]:subarchitecture:' \
   '--arch-in-name[include architecture in kernel image name]' \
   '--pgpsign[sign changes file]:name' \
   '--config[specify configuration target]:target:(oldconfig config menuconfig xconfig old menu x)' \
   '--targets[list known targets]' \
   '--noexec[pass -n option to make]' \
   '--verbose[show top level make commands]' \
   '--initrd[create image suitable for initrd]' \
   '(--bzimage)--zimage[make zImage instead of bzImage]' \
   '(--zimage)--bzimage[make bzImage instead of zImage]' \
   '--mkimage[command that produces an initrd image given a directory]:command:' \
   '--rootcmd[specify command for gaining root access]:root command:(sudo fakeroot)' \
   '--stem:package name stem:(kernel linux)' \
   '--us[unsigned source]' \
   '--uc[unsigned changelog]' \
   '*:target:(( \
        clean\:"clean the kernel source directory" \
        buildpackage\:"runs the targets clean and binary" \
        binary\:"all kernel packages" \
        binary-indep\:"arch independent packages" \
        binary-arch\:"arch dependent packages" \
        kernel-source\:"package of the kernel sources" \
        kernel-headers\:"package of the header files included in the kernel" \
        kernel-manual\:"package of the manual pages included in the kernel" \
        kernel-doc\:"package of the documentation included in the kernel" \
        kernel-image\:"package of the kernel image" \
        build\:"compiles the kernel" \
        modules\:"build all add-on modules" \
        modules-config\:"configure all add-on modules" \
        modules-image\:"build all add-on modules, but without source and diff files" \
        modules-clean\:"clean add-on modules" \
        configure\:"configure the kernel" \
        debian\:"creates the debian/ directory" \
        libc-kheaders\:"create the kernel headers package needed by libc" \
    ))' && return

case "$state" in
  (addedmodules)
    compset -P '*,'
    _alternative \
      'moddirs:module dirs:_files -/ -S ,' \
      'modules:loc module dirs:_files -/ -W ${MODULE_LOC:-/usr/src/modules} -S ,'
  ;;
esac