I write a web server, mainly for practice, and decided to get acquainted with make and make files. My goal is to automate the assembly of my vps using Clang / LLVM to create software and save the diagnostics in a text file so that the script can send to my email address. What I cannot achieve is to save the diagnostics in my file.
While my Clang is working successfully and generating diagnostics, and my makefile seems to be working, I was unable to redirect the diagnostics both inside the makefile and from the command line.
My makefile (works correctly, but slightly modified to save the need to save results):
# Makefile to build Ironman HTTP Server
I suspect that (maybe I'm terribly mistaken here) this is because clang doesn't really return diagnostics, it just prints them. I don't know if this is the case, and the Clang user guide does not offer anything like this.
[EDIT]: I played a little with Clang and saw that, on successful compilation, it returns 0. The method with which I tested it is:
$ clang <source_file.c> $ echo $? 0
This suggests that my theory may be correct, which complicates things: - \
Can someone point me in the right direction?
source share