File: _makeobj

package info (click to toggle)
kde-dev-scripts 4%3A18.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,496 kB
  • sloc: perl: 15,466; lisp: 5,627; sh: 4,157; python: 3,892; ruby: 2,158; makefile: 16; sed: 9
file content (30 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (11)
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
#compdef makeobj

local index olddir dir subdir

olddir=$PWD
index="$words[(I)-[fCI]]"
if ! ((index)); then
  if [ ! -f Makefile ]; then
    if [ -n "$OBJ_SUBDIR" ]; then
      dir=$PWD
      subdir=.
      while [ -n "$dir" -a $dir != '/' -a ! -f $dir/$OBJ_SUBDIR/$subdir/Makefile ]; do
        dir=$dir(:h)
        subdir=$dir(:t)/$subdir
      done
      if -f $dir/$OBJ_SUBDIR/$subdir/Makefile; then
        cd $dir/$OBJ_SUBDIR/$subdir
      fi
    elif [ -n "$OBJ_REPLACEMENT" ]; then
      dir=$(echo $PWD | sed -e "$OBJ_REPLACEMENT")
      if [ -f $dir/Makefile ]; then
        cd $dir
      fi
    fi
  fi
fi

_make

cd $olddir