Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
ce4a4e61
Commit
ce4a4e61
authored
Jun 06, 1999
by
Kurt Zeilenga
Browse files
Allow -m to set CC_MKDEP and -x to set CC_MKDEP_FLAGS.
parent
e9b41143
Changes
1
Show whitespace changes
Inline
Side-by-side
build/mkdep
View file @
ce4a4e61
...
...
@@ -33,8 +33,6 @@ SRCDIR=""
SED
=
cat
:
${
CC
=cc
}
# use cc by default
:
${
CC_MKDEP
=
$CC
}
# select default compiler to generate dependencies
:
${
CC_MKDEP_FLAGS
=
"-M"
}
# cc -M usually produces dependencies
while
:
do case
"
$1
"
in
...
...
@@ -53,12 +51,23 @@ while :
SRCDIR
=
$2
shift
;
shift
;;
# -c allows you to select a compiler to use to generate
# dependencies. Leaves $CC alone.
# -c allows you to override the default compiler.
-c
)
CC
=
$2
shift
;
shift
;;
# -m allows you to override the compiler used to generate
# dependencies.
-m
)
CC_MKDEP
=
$2
shift
;
shift
;;
# -m allows you to override the compiler flags used to generate
# dependencies.
-x
)
CC_MKDEP_FLAGS
=
$2
shift
;
shift
;;
# the -p flag produces "program: program.c" style dependencies
# so .o's don't get produced
-p
)
...
...
@@ -78,8 +87,11 @@ while :
esac
done
:
${
CC_MKDEP
=
$CC
}
# select default compiler to generate dependencies
:
${
CC_MKDEP_FLAGS
=
"-M"
}
# cc -M usually produces dependencies
if
test
$#
=
0
;
then
echo
'usage: mkdep [-p] [-s] [-c cc] [-f makefile] [-d srcdir] [flags] file ...'
echo
'usage: mkdep [-p] [-s] [-c cc]
[-m cc] [-x flags]
[-f makefile] [-d srcdir] [
cpp
flags] file ...'
exit
1
fi
...
...
@@ -123,7 +135,8 @@ else
files
=
"
$files
$i
"
fi
done
CC
=
"
$CC
-I
$SRCDIR
"
CC_MKDEP_FLAGS
=
"
$CC_MKDEP_FLAGS
-I
$SRCDIR
"
fi
cat
<<
_EOF_
>>
$TMP
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment