citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit d79ef609b5304b8094f714999588e51f673f9a28
parent 111d7e230898faa24b3e7e0095883039ba7c7f12
Author: Kyle Milz <milz@imac.0x30.net>
Date:   Wed,  3 Mar 2021 21:45:21 -0800

jam: delete

Diffstat:
DJamfile | 6------
DJamrules | 156-------------------------------------------------------------------------------
Dlib/Jamfile | 8--------
Dman/Jamfile | 8--------
Dshare/citrun/Jamfile | 9---------
5 files changed, 0 insertions(+), 187 deletions(-)

diff --git a/Jamfile b/Jamfile @@ -1,6 +0,0 @@ -SubDir TOP ; - -SubInclude TOP bin ; -SubInclude TOP lib ; -SubInclude TOP man ; -SubInclude TOP share citrun ; diff --git a/Jamrules b/Jamrules @@ -1,156 +0,0 @@ -echo ░█▀▀░░░▀█▀░▀█▀░░░█▀▄░█░█░█▀█ ; -echo ░█░░░░░░█░░░█░░░░█▀▄░█░█░█░█ ; -echo ░▀▀▀░░░▀▀▀░░▀░░░░▀░▀░▀▀▀░▀░▀ ; -echo ; - -PREFIX ?= `pwd` ; - -echo PREFIX \= $(PREFIX) ; -echo CFLAGS \= $(CFLAGS) ; -echo LDFLAGS \= $(LDFLAGS) ; -echo ; - -if $(OS) = "OPENBSD" { - echo "Good to go soldier." ; -} -else if $(OS) = "Darwin" { - GL_EXTRALIB = "-framework OpenGL" ; -} -else if $(OS) = "Linux" { - INST_EXTRALIB = "-lbsd" ; - GL_EXTRALIB = "-lbsd" ; -} -else { - echo "WARNING: Platform '$(OS)' untested, compilation may fail." ; - echo "WARNING: Run `jam check_dependencies` first." ; - echo ; -} - -CCFLAGS += $(CFLAGS) -Wall -W -Wcast-qual - -Wwrite-strings ; - -C++FLAGS += $(CFLAGS) -Wall -W -Wcast-qual - -std=c++11 - -fno-exceptions - -fno-rtti - -Wno-unused-parameter - -Werror=date-time - -fvisibility-inlines-hidden - -Wdelete-non-virtual-dtor ; - -LINKFLAGS += $(LDFLAGS) ; - -gl_pkgs = "glfw3 glew glyphy freetype2" ; # osmesa - -# Quote an entire file and add a variable declaration prefixing the string. -rule Stringize -{ - MakeLocate $(1) : $(LOCATE_SOURCE) ; - SEARCH on $(2) = $(SEARCH_SOURCE) ; - Depends $(1) : $(2) ; - Clean clean : $(1) ; -} - -actions Stringize -{ - > $(<) echo "static const char *$(1:B) = R\"(" - >> $(<) cat $(>) - >> $(<) echo ")\";" -} - -actions ReplacePrefix { - sed -i -e "s, PREFIX ,$(PREFIX)," $(<) -} - -actions PkgConfig -{ - set -e - type pkg-config - echo - - for pkg in $(gl_pkgs); do - echo -n "$pkg = " - pkg-config --modversion $pkg || echo "NOT FOUND" - done -} - -actions C++11 -{ - $(CC) -x c++ -std=c++11 -E - < /dev/null > /dev/null -} - -C++11 check_dependencies ; -PkgConfig check_dependencies ; - -# -# Run clang static analysis on the build. -# -actions Analysis -{ - scan-build -o html jam -j4 -} - -# -# Get test coverage from black box suite. -# -actions TestCoverage -{ - set -e - #CFLAGS="-coverage" LDFLAGS="-coverage" ./configure - #CFLAGS="--coverage" LDFLAGS="--coverage" jam -j4 - CXX=/usr/local/bin/clang++ CFLAGS="-fprofile-instr-generate -fcoverage-mapping" LDFLAGS=${CFLAGS} jam -dx - -exit 1 - # Roll libgcov.a into libcitrun.a. - ar -M < t/libcitrun_gcov.mri - - prove - # prove tt - - mkdir gcov - # The output from gcov is valuable to save too. - gcov -o lib lib/lib*.c | tee gcov/SUMMARY - egcov -r bin/*.cc | tee -a gcov/SUMMARY - mv *.gcov gcov/ -} - -# -# Use C It Run on itself. -# -actions CCItRunRun -{ - set -e - echo - read go?"Target destructively changes source code. Proceed? (y/n) " - - if [ $go != y ]; then - echo Aborting - exit 0 - fi - - # - # Namespace global instrumentation variables such that they don't - # collide with the actual instrumentation. - # - sed -i \ - -e "s,struct citrun_node,struct ccitrunrun_node," \ - -e "s,citrun_node_add,ccitrunrun_node_add," \ - -e "s,citrun_major,ccitrunrun_major,g" \ - -e "s,citrun_minor,ccitrunrun_minor,g" \ - citrun.h citrun.c inst_action.cc inst_fe.cc gl_procfile.cc - - # - # Change binary names so we can do a side by side installation. - # - sed -i \ - -e "s,citrun_inst,ccitrunrun_inst," \ - -e "s,citrun_term,ccitrunrun_term," \ - -e "s,citrun_gl,ccitrunrun_gl," \ - -e "s,libcitrun,libccitrunrun," \ - Jamfile citrun.c inst_main.cc - jam -} - -Analysis analysis ; -TestCoverage coverage ; -CCItRunRun ccitrunrun ; diff --git a/lib/Jamfile b/lib/Jamfile @@ -1,8 +0,0 @@ -SubDir TOP lib ; - -Stringize citrun_h.h : citrun.h ; - -ObjectCcFlags citrun.c unix.c : -fPIC -ansi ; -Library libcitrun : citrun.c unix.c ; - -InstallLib $(PREFIX)/lib : libcitrun.a ; diff --git a/man/Jamfile b/man/Jamfile @@ -1,8 +0,0 @@ -SubDir TOP man ; - -InstallMan $(PREFIX)/man : - citrun_gl.1 - citrun_inst.1 - citrun_wrap.1 - citrun_report.1 - ; diff --git a/share/citrun/Jamfile b/share/citrun/Jamfile @@ -1,9 +0,0 @@ -SubDir TOP share citrun ; - -rule InstallSym -{ - InstallInto $(<) : $(>) ; - MODE on $(>:G=$(INSTALLGRIST)) = $(EXEMODE) ; -} - -InstallBin $(PREFIX)/share/citrun : cc gcc clang clang++ g++ c++ egcc eg++ ;