From: John Hodge Date: Sat, 24 May 2014 15:05:55 +0000 (+0800) Subject: UDI/udibuild - Added command tracing flag, C99 pedantic in default config X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=955dea0bc767f12aa8d53cfdcae60240c05674ca;p=tpg%2Facess2.git UDI/udibuild - Added command tracing flag, C99 pedantic in default config --- diff --git a/UDI/Tools/udibuild.ini b/UDI/Tools/udibuild.ini index 8c7ca2d5..1c5739cf 100644 --- a/UDI/Tools/udibuild.ini +++ b/UDI/Tools/udibuild.ini @@ -1,6 +1,7 @@ [COMMON] [ia32] -CFLAGS=-ffreestanding -I/home/tpg/Projects/GitClones/acess2/UDI/include/ -Wall -Wextra -Wno-unused-parameter -Wswitch-default +CFLAGS=-ffreestanding -I/home/tpg/Projects/GitClones/acess2/UDI/include/ -Wall -Wextra -Wno-unused-parameter -std=c99 -pedantic +# -Wc++-compat CC=i586-elf-gcc LD=i586-elf-ld diff --git a/UDI/Tools/udibuild_src/build.c b/UDI/Tools/udibuild_src/build.c index 4d0b2947..88f04738 100644 --- a/UDI/Tools/udibuild_src/build.c +++ b/UDI/Tools/udibuild_src/build.c @@ -40,6 +40,9 @@ int Build_CompileFile(tIniFile *opts, const char *abi, tUdiprops *udiprops, tUdi srcfile->CompileOpts ? srcfile->CompileOpts : "", srcfile->Filename, objfile); printf("--- Compiling: %s\n", srcfile->Filename); + if( gbTraceEnabled ) { + printf(">> %s\n", cmd); + } int rv = system(cmd); free(cmd); free(objfile); @@ -110,7 +113,9 @@ int Build_LinkObjects(tIniFile *opts, const char *abi, tUdiprops *udiprops) abi, udiprops->ModuleName, objfiles_str, udiprops_c ); printf("--- Linking: bin/%s/%s\n", abi, udiprops->ModuleName); - printf("%s\n", cmd); + if( gbTraceEnabled ) { + printf(">> %s\n", cmd); + } int rv = system(cmd); free(cmd); free(udiprops_c); diff --git a/UDI/Tools/udibuild_src/include/common.h b/UDI/Tools/udibuild_src/include/common.h index 0cb419b6..2f92913e 100644 --- a/UDI/Tools/udibuild_src/include/common.h +++ b/UDI/Tools/udibuild_src/include/common.h @@ -9,6 +9,7 @@ #define _COMMON_H_ #include +#include #ifndef __GNUC__ # define __attribute__(...) @@ -16,5 +17,7 @@ extern char *mkstr(const char *fmt, ...) __attribute__((format(printf,1,2))); +extern bool gbTraceEnabled; + #endif diff --git a/UDI/Tools/udibuild_src/main.c b/UDI/Tools/udibuild_src/main.c index b5b0042e..f933cc1b 100644 --- a/UDI/Tools/udibuild_src/main.c +++ b/UDI/Tools/udibuild_src/main.c @@ -29,6 +29,7 @@ void Usage(const char *progname); // === GLOBALS === +bool gbTraceEnabled = false; const char *gsRuntimeDir = RUNTIME_DIR; const char *gsOpt_ConfigFile; const char *gsOpt_WorkingDir;