Using compiler capability to generate dependencies.

This closes #58 issue on GitHub.
This commit is contained in:
Max Romanov
2017-12-01 16:28:06 +03:00
parent 1add36a7ee
commit 630ec3f1ec
7 changed files with 78 additions and 119 deletions

25
auto/cc/deps Normal file
View File

@@ -0,0 +1,25 @@
case "$NXT_CC_NAME" in
SunC):
nxt_gen_dep_flags() {
$echo "-xMMD -xMF $NXT_BUILD_DIR/$nxt_dep.tmp"
}
nxt_gen_dep_post() {
$echo -n "@sed -e 's#^.*:#$NXT_BUILD_DIR/$nxt_obj:#' "
$echo -n "$NXT_BUILD_DIR/$nxt_dep.tmp > $NXT_BUILD_DIR/$nxt_dep"
$echo " && rm -f $NXT_BUILD_DIR/$nxt_dep.tmp"
}
;;
*)
nxt_gen_dep_flags() {
$echo "-MMD -MF $NXT_BUILD_DIR/$nxt_dep -MT $NXT_BUILD_DIR/$nxt_obj"
}
nxt_gen_dep_post() {
$echo ""
}
;;
esac