diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:28:06 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-01 16:28:06 +0300 |
commit | 630ec3f1eca0543b2d10c409822ea4acb657c87c (patch) | |
tree | a5256391de48996133269e860486c28e4745824f /auto/cc/deps | |
parent | 1add36a7ee543b993aeba10c04a4abfc0244c3f8 (diff) | |
download | unit-630ec3f1eca0543b2d10c409822ea4acb657c87c.tar.gz unit-630ec3f1eca0543b2d10c409822ea4acb657c87c.tar.bz2 |
Using compiler capability to generate dependencies.
This closes #58 issue on GitHub.
Diffstat (limited to 'auto/cc/deps')
-rw-r--r-- | auto/cc/deps | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/auto/cc/deps b/auto/cc/deps new file mode 100644 index 00000000..6e7df20f --- /dev/null +++ b/auto/cc/deps @@ -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 |