mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Add simple check target.
This will test the coz library and make sure it is linkable and the resulting binary is runnable. This test detects a problem with GCC 6 when combined with clang that is missing with 4.9.
This commit is contained in:
parent
54c526d5c7
commit
b6c844c6ec
3
Makefile
3
Makefile
@ -6,6 +6,9 @@ include $(ROOT)/common.mk
|
||||
bench::
|
||||
@for dir in benchmarks ; do make -C $$dir $@; done
|
||||
|
||||
check::
|
||||
make -C libcoz $@
|
||||
|
||||
install::
|
||||
$(INSTALL) -D coz $(DESTDIR)$(bindir)/coz
|
||||
$(INSTALL) -D include/coz.h $(DESTDIR)$(incdir)/coz.h
|
||||
|
@ -7,5 +7,12 @@ PREREQS := $(ROOT)/deps/ccutil $(ROOT)/deps/libelfin
|
||||
|
||||
include $(ROOT)/common.mk
|
||||
|
||||
check:: libcoz.so
|
||||
printf "int main(int argc, char *argv[])\n{\nreturn (0);\n}\n" > x.c
|
||||
gcc -Wl,-rpath,`pwd` -o x x.c libcoz.so -ldl || ( $(RM) x x.c ; exit 1)
|
||||
./x
|
||||
if grep -q time= profile.coz; then echo success: coz profiler ran as it should.; fi
|
||||
$(RM) -f x.c x profile.coz
|
||||
|
||||
install::
|
||||
$(INSTALL) -D $(ROOT)/libcoz/libcoz.so $(DESTDIR)$(pkglibdir)/libcoz.so
|
||||
|
Loading…
Reference in New Issue
Block a user