Origin for each line in
Makefile
from check-in 997a035b20:
eebfe1f40f 2020-03-25 1: TCLSH_NATIVE := tclsh
eebfe1f40f 2020-03-25 2: TCL_CONFIG_SH_DIR := $(shell echo 'puts [tcl::pkgconfig get libdir,runtime]' | $(TCLSH_NATIVE))
eebfe1f40f 2020-03-25 3: TCL_CONFIG_SH := $(TCL_CONFIG_SH_DIR)/tclConfig.sh
2139fe19a8 2019-09-18 4: XVFS_ROOT_MOUNTPOINT := //xvfs:/
2139fe19a8 2019-09-18 5: CPPFLAGS := -DXVFS_ROOT_MOUNTPOINT='"$(XVFS_ROOT_MOUNTPOINT)"' -I. -DUSE_TCL_STUBS=1 -DXVFS_DEBUG $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_INCLUDE_SPEC}") $(XVFS_ADD_CPPFLAGS)
7225016a7e 2019-09-17 6: CFLAGS := -fPIC -g3 -ggdb3 -Wall $(XVFS_ADD_CFLAGS)
55084356ba 2019-09-17 7: LDFLAGS := $(XVFS_ADD_LDFLAGS)
7d5fcf4486 2020-04-13 8: LIBS := $(XVFS_ADD_LIBS)
7d5fcf4486 2020-04-13 9: TCL_LIB := $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_LIB_SPEC}")
7d5fcf4486 2020-04-13 10: TCL_STUB_LIB := $(shell . "${TCL_CONFIG_SH}" && echo "$${TCL_STUB_LIB_SPEC}")
55084356ba 2019-09-17 11: TCLSH := tclsh
55084356ba 2019-09-17 12: LIB_SUFFIX := $(shell . "${TCL_CONFIG_SH}"; echo "$${TCL_SHLIB_SUFFIX:-.so}")
55084356ba 2019-09-17 13:
d09edad10f 2019-09-17 14: all: example-standalone$(LIB_SUFFIX) example-client$(LIB_SUFFIX) example-flexible$(LIB_SUFFIX) xvfs$(LIB_SUFFIX)
d09edad10f 2019-09-17 15:
eebfe1f40f 2020-03-25 16: example.c: $(shell find example -type f) $(shell find lib -type f) lib/xvfs/xvfs.c.rvt xvfs-create-c xvfs-create Makefile
eebfe1f40f 2020-03-25 17: rm -f example.c.new.1 example.c.new.2
eebfe1f40f 2020-03-25 18: ./xvfs-create-c --directory example --name example > example.c.new.1
eebfe1f40f 2020-03-25 19: ./xvfs-create --directory example --name example > example.c.new.2
eebfe1f40f 2020-03-25 20: bash -c "diff -u <(grep -v '^ *$$' example.c.new.1) <(grep -v '^ *$$' example.c.new.2)" || :
eebfe1f40f 2020-03-25 21: rm -f example.c.new.2
eebfe1f40f 2020-03-25 22: mv example.c.new.1 example.c
d09edad10f 2019-09-17 23:
d09edad10f 2019-09-17 24: example-standalone.o: example.c xvfs-core.h xvfs-core.c Makefile
d09edad10f 2019-09-17 25: $(CC) $(CPPFLAGS) -DXVFS_MODE_STANDALONE $(CFLAGS) -o example-standalone.o -c example.c
d09edad10f 2019-09-17 26:
d09edad10f 2019-09-17 27: example-standalone$(LIB_SUFFIX): example-standalone.o Makefile
7d5fcf4486 2020-04-13 28: $(CC) $(CFLAGS) $(LDFLAGS) -shared -o example-standalone$(LIB_SUFFIX) example-standalone.o $(LIBS) $(TCL_STUB_LIB)
511419642c 2019-09-16 29:
511419642c 2019-09-16 30: example-client.o: example.c xvfs-core.h Makefile
55084356ba 2019-09-17 31: $(CC) $(CPPFLAGS) -DXVFS_MODE_CLIENT $(CFLAGS) -o example-client.o -c example.c
55084356ba 2019-09-17 32:
55084356ba 2019-09-17 33: example-client$(LIB_SUFFIX): example-client.o Makefile
7d5fcf4486 2020-04-13 34: $(CC) $(CFLAGS) $(LDFLAGS) -shared -o example-client$(LIB_SUFFIX) example-client.o $(LIBS) $(TCL_STUB_LIB)
55084356ba 2019-09-17 35:
b502b175ea 2020-04-13 36: example-flexible.o: example.c xvfs-core.h xvfs-core.c Makefile
55084356ba 2019-09-17 37: $(CC) $(CPPFLAGS) -DXVFS_MODE_FLEXIBLE $(CFLAGS) -o example-flexible.o -c example.c
a4f7828c1d 2019-09-17 38:
55084356ba 2019-09-17 39: example-flexible$(LIB_SUFFIX): example-flexible.o Makefile
7d5fcf4486 2020-04-13 40: $(CC) $(CFLAGS) $(LDFLAGS) -shared -o example-flexible$(LIB_SUFFIX) example-flexible.o $(LIBS) $(TCL_STUB_LIB)
a4f7828c1d 2019-09-17 41:
a4f7828c1d 2019-09-17 42: xvfs.o: xvfs-core.h xvfs-core.c Makefile
a4f7828c1d 2019-09-17 43: $(CC) $(CPPFLAGS) -DXVFS_MODE_SERVER $(CFLAGS) -o xvfs.o -c xvfs-core.c
a4f7828c1d 2019-09-17 44:
55084356ba 2019-09-17 45: xvfs$(LIB_SUFFIX): xvfs.o Makefile
7d5fcf4486 2020-04-13 46: $(CC) $(CFLAGS) $(LDFLAGS) -shared -o xvfs$(LIB_SUFFIX) xvfs.o $(LIBS) $(TCL_STUB_LIB)
d80c88cee0 2019-09-16 47:
d80c88cee0 2019-09-16 48: # xvfs-create-standalone is a standalone (i.e., no external dependencies
d80c88cee0 2019-09-16 49: # like lib/minirivet, xvfs-core.c, etc) version of "xvfs-create"
2b7fa3a8fa 2019-09-20 50: xvfs-create-standalone: $(shell find lib -type f) xvfs-create xvfs-core.c xvfs-core.h lib/xvfs/xvfs.c.rvt Makefile
d80c88cee0 2019-09-16 51: rm -f xvfs-create-standalone.new xvfs-create-standalone
d80c88cee0 2019-09-16 52: ./xvfs-create --dump-tcl --remove-debug > xvfs-create-standalone.new
d80c88cee0 2019-09-16 53: chmod +x xvfs-create-standalone.new
d80c88cee0 2019-09-16 54: mv xvfs-create-standalone.new xvfs-create-standalone
eebfe1f40f 2020-03-25 55:
eebfe1f40f 2020-03-25 56: xvfs-create-c: xvfs-create-c.o
eebfe1f40f 2020-03-25 57: $(CC) $(CFLAGS) $(LDFLAGS) -o xvfs-create-c xvfs-create-c.o $(LIBS)
eebfe1f40f 2020-03-25 58:
eebfe1f40f 2020-03-25 59: xvfs-create-c.o: xvfs-create-c.c
eebfe1f40f 2020-03-25 60: $(CC) $(CPPFLAGS) $(CFLAGS) -o xvfs-create-c.o -c xvfs-create-c.c
3cae553059 2019-09-20 61:
ca3a163ab4 2019-09-20 62: xvfs_random$(LIB_SUFFIX): $(shell find example -type f) $(shell find lib -type f) lib/xvfs/xvfs.c.rvt xvfs-create-random Makefile
9b49bfa195 2019-09-20 63: ./xvfs-create-random | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DXVFS_MODE_FLEXIBLE -x c - -shared -o xvfs_random$(LIB_SUFFIX) $(LIBS)
ca3a163ab4 2019-09-20 64:
ca3a163ab4 2019-09-20 65: xvfs_synthetic$(LIB_SUFFIX): $(shell find lib -type f) lib/xvfs/xvfs.c.rvt xvfs-create-synthetic Makefile
9b49bfa195 2019-09-20 66: ./xvfs-create-synthetic | $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -DXVFS_MODE_FLEXIBLE -x c - -shared -o xvfs_synthetic$(LIB_SUFFIX) $(LIBS)
ca3a163ab4 2019-09-20 67:
3cae553059 2019-09-20 68: do-benchmark:
7225016a7e 2019-09-17 69: $(MAKE) clean all XVFS_ADD_CPPFLAGS="-UXVFS_DEBUG" XVFS_ADD_CFLAGS="-g0 -ggdb0 -s -O3"
b0e3b6588f 2019-09-17 70: ./benchmark.tcl
b0e3b6588f 2019-09-17 71:
d09edad10f 2019-09-17 72: test: example-standalone$(LIB_SUFFIX) xvfs$(LIB_SUFFIX) example-client$(LIB_SUFFIX) example-flexible$(LIB_SUFFIX) Makefile
d80c88cee0 2019-09-16 73: rm -f __test__.tcl
2139fe19a8 2019-09-18 74: echo 'if {[catch { eval $$::env(XVFS_TEST_LOAD_COMMANDS); source $(XVFS_ROOT_MOUNTPOINT)example/main.tcl }]} { puts stderr $$::errorInfo; exit 1 }; exit 0' > __test__.tcl
2139fe19a8 2019-09-18 75: @export XVFS_ROOT_MOUNTPOINT; export XVFS_TEST_LOAD_COMMANDS; for XVFS_TEST_LOAD_COMMANDS in \
d09edad10f 2019-09-17 76: 'load ./example-standalone$(LIB_SUFFIX) Xvfs_example' \
55084356ba 2019-09-17 77: 'load -global ./xvfs$(LIB_SUFFIX); load ./example-client$(LIB_SUFFIX) Xvfs_example' \
55084356ba 2019-09-17 78: 'load ./xvfs$(LIB_SUFFIX); load ./example-flexible$(LIB_SUFFIX) Xvfs_example' \
997a035b20 2020-04-17 79: 'load ./example-flexible$(LIB_SUFFIX) Xvfs_example' \
997a035b20 2020-04-17 80: 'load ./xvfs$(LIB_SUFFIX); load ./example-standalone$(LIB_SUFFIX) Xvfs_example' \
997a035b20 2020-04-17 81: 'load ./example-standalone$(LIB_SUFFIX) Xvfs_example; load ./xvfs$(LIB_SUFFIX)'; do \
55084356ba 2019-09-17 82: echo "[$${XVFS_TEST_LOAD_COMMANDS}] $(GDB) $(TCLSH) __test__.tcl $(TCL_TEST_ARGS)"; \
55084356ba 2019-09-17 83: $(GDB) $(TCLSH) __test__.tcl $(TCL_TEST_ARGS) || exit 1; \
55084356ba 2019-09-17 84: done
d80c88cee0 2019-09-16 85: rm -f __test__.tcl
77d5262842 2019-09-16 86:
3cae553059 2019-09-20 87: do-test: test
3cae553059 2019-09-20 88:
3cae553059 2019-09-20 89: do-coverage:
77d5262842 2019-09-16 90: $(MAKE) clean
d1ae68c7a1 2019-09-17 91: $(MAKE) XVFS_ADD_CFLAGS=-coverage XVFS_ADD_LDFLAGS=-coverage
10f67b2ced 2019-09-16 92: $(MAKE) test XVFS_TEST_EXIT_ON_FAILURE=0
77d5262842 2019-09-16 93: rm -f xvfs-test-coverage.info
77d5262842 2019-09-16 94: lcov --capture --directory . --output-file xvfs-test-coverage.info
77d5262842 2019-09-16 95: rm -rf xvfs-test-coverage
77d5262842 2019-09-16 96: mkdir xvfs-test-coverage
77d5262842 2019-09-16 97: genhtml xvfs-test-coverage.info --output-directory xvfs-test-coverage
77d5262842 2019-09-16 98: rm -f xvfs-test-coverage.info
77d5262842 2019-09-16 99:
22c09ebad1 2019-09-20 100: profile-bare: profile.c example.c xvfs-core.h xvfs-core.c Makefile
22c09ebad1 2019-09-20 101: $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -UUSE_TCL_STUBS -o profile-bare profile.c -ltcl
22c09ebad1 2019-09-20 102:
22c09ebad1 2019-09-20 103: profile-gperf: profile.c example.c xvfs-core.h xvfs-core.c Makefile
22c09ebad1 2019-09-20 104: $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -pg -UUSE_TCL_STUBS -o profile-gperf profile.c -ltcl
3cae553059 2019-09-20 105:
22c09ebad1 2019-09-20 106: do-profile: profile-bare profile-gperf Makefile
3cae553059 2019-09-20 107: rm -rf oprofile_data
22c09ebad1 2019-09-20 108: rm -f gmon.out callgrind.out
22c09ebad1 2019-09-20 109: operf ./profile-bare
3cae553059 2019-09-20 110: opreport
22c09ebad1 2019-09-20 111: ./profile-gperf
22c09ebad1 2019-09-20 112: gprof ./profile-gperf
22c09ebad1 2019-09-20 113: valgrind --tool=callgrind --callgrind-out-file=callgrind.out ./profile-bare 10 2
22c09ebad1 2019-09-20 114: callgrind_annotate callgrind.out
22c09ebad1 2019-09-20 115:
7d5fcf4486 2020-04-13 116: do-valgrind: Makefile
7d5fcf4486 2020-04-13 117: $(MAKE) test XVFS_TEST_EXIT_ON_FAILURE=0 GDB='valgrind --tool=memcheck --track-origins=yes --leak-check=full'
7d5fcf4486 2020-04-13 118:
7d5fcf4486 2020-04-13 119: tclsh-local: tclsh-local.c
7d5fcf4486 2020-04-13 120: $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -UUSE_TCL_STUBS -o tclsh-local tclsh-local.c $(LIBS) $(TCL_LIB)
7d5fcf4486 2020-04-13 121:
7d5fcf4486 2020-04-13 122: do-asan: Makefile
7d5fcf4486 2020-04-13 123: rm -f tclsh-local
5b3a8701d2 2020-04-13 124: $(MAKE) tclsh-local test XVFS_TEST_EXIT_ON_FAILURE=0 CC='clang -fsanitize=address,undefined,leak' XVFS_ADD_CFLAGS='-Wno-string-plus-int' TCLSH=./tclsh-local
7d5fcf4486 2020-04-13 125:
7d5fcf4486 2020-04-13 126: do-msan: Makefile
7d5fcf4486 2020-04-13 127: rm -f tclsh-local
7d5fcf4486 2020-04-13 128: $(MAKE) tclsh-local test XVFS_TEST_EXIT_ON_FAILURE=0 CC='clang -fsanitize=memory' XVFS_ADD_CFLAGS='-Wno-string-plus-int' TCLSH=./tclsh-local
7d5fcf4486 2020-04-13 129:
0a9369ff13 2019-05-02 130: clean:
d80c88cee0 2019-09-16 131: rm -f xvfs-create-standalone.new xvfs-create-standalone
eebfe1f40f 2020-03-25 132: rm -f xvfs-create-c.o xvfs-create-c
eebfe1f40f 2020-03-25 133: rm -f example.c example.c.new example.c.new.1 example.c.new.2
d09edad10f 2019-09-17 134: rm -f example-standalone$(LIB_SUFFIX) example-standalone.o
55084356ba 2019-09-17 135: rm -f example-client.o example-client$(LIB_SUFFIX)
55084356ba 2019-09-17 136: rm -f example-flexible.o example-flexible$(LIB_SUFFIX)
55084356ba 2019-09-17 137: rm -f xvfs.o xvfs$(LIB_SUFFIX)
2f92a3a715 2019-09-17 138: rm -f example-standalone.gcda example-standalone.gcno
2f92a3a715 2019-09-17 139: rm -f example-client.gcda example-client.gcno
2f92a3a715 2019-09-17 140: rm -f example-flexible.gcda example-flexible.gcno
eebfe1f40f 2020-03-25 141: rm -f xvfs-create-c.gcda xvfs-create-c.gcno
ca3a163ab4 2019-09-20 142: rm -f xvfs_random$(LIB_SUFFIX) xvfs_synthetic$(LIB_SUFFIX)
2f92a3a715 2019-09-17 143: rm -f xvfs.gcda xvfs.gcno
5583d77f1c 2019-09-14 144: rm -f __test__.tcl
22c09ebad1 2019-09-20 145: rm -f profile-bare profile-gperf
22c09ebad1 2019-09-20 146: rm -f gmon.out
22c09ebad1 2019-09-20 147: rm -f callgrind.out
3cae553059 2019-09-20 148: rm -rf oprofile_data
77d5262842 2019-09-16 149: rm -f xvfs-test-coverage.info
77d5262842 2019-09-16 150: rm -rf xvfs-test-coverage
7d5fcf4486 2020-04-13 151: rm -f tclsh-local
0a9369ff13 2019-05-02 152:
0a9369ff13 2019-05-02 153: distclean: clean
0a9369ff13 2019-05-02 154:
7d5fcf4486 2020-04-13 155: .PHONY: all clean distclean test do-test do-coverage do-benchmark do-profile do-valgrind do-asan do-msan