File: prog_mkdep.in

package info (click to toggle)
mk-configure 0.37.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 4,112 kB
  • sloc: ansic: 5,441; makefile: 1,412; sh: 1,086; cpp: 200; perl: 101; yacc: 85; lex: 21
file content (41 lines) | stat: -rwxr-xr-x 720 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

############################################################
# Copyright (c) 2013 by Aleksey Cheusov
#
# See LICENSE file in the distribution.
############################################################

LC_ALL=C
export LC_ALL

: ${CHECK_COMMON_SH_DIR:=@mkc_libexecdir@}

extra_args="$*"

pathpart='custom_nbmkdep'
. ${CHECK_COMMON_SH_DIR}/mkc_check_common.sh

trap "rm -f $tmpc $tmpo" 0

cat > "$tmpc" <<'EOF'
#include <stdio.h>
EOF

if test -n "$MKDEP_CC"; then
    CC="$MKDEP_CC"
    export CC
fi

check_mkdep (){
    "$1" -f "$tmpo" $extra_args -I . -I `pwd` "$tmpc"
}

for i in bmkdep nbmkdep mkdep; do
    if test -z "`check_mkdep $i 2>&1 > /dev/null`"; then
	mkc_which $i
	exit 0
    fi
done

echo ''