Skip to content

Commit fb1696a

Browse files
committed
Makefile: deprecating some targets and code
Unit tests that use the googletest framework are being deprecated for now. We may bring them back when we find them to be useful/necessary.
1 parent 898963b commit fb1696a

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

Makefile

+27-20
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@ KCTLDIR = $(TLD)/toolbox/kctl
2121
BKVDIR = $(TLD)/toolbox/bkv
2222
LISTDIR = $(TLD)/vendor/list
2323
PROTOBUFDIR = $(TLD)/vendor/protobuf-c
24-
GTESTDIR = $(TLD)/vendor/googletest
2524
SRCDIR = $(TLD)/src
2625
TBDIR = $(TLD)/toolbox
27-
TESTDIR = $(TLD)/tests
2826

2927
LPROTOBUF = $(BUILDLIB)/libprotobuf-c.so
3028
LLIST = $(BUILDLIB)/liblist.a
3129
LKINETIC = $(BUILDLIB)/libkinetic.a
32-
LGTEST = $(BUILDLIB)/libgtest.a
3330
KCTL = $(BUILDBIN)/kctl
3431

32+
# These are being deprecated for now
33+
# TESTDIR = $(TLD)/tests
34+
# GTESTDIR = $(TLD)/vendor/googletest
35+
# LGTEST = $(BUILDLIB)/libgtest.a
36+
3537
CC = gcc
3638
CFLAGS = -g -I$(BUILDDIR)/include
3739
LDFLAGS = -L$(BUILDDIR)/lib
@@ -48,8 +50,6 @@ DISTFILES = \
4850

4951
all: $(BUILDDIR) $(LPROTOBUF) $(LLIST) $(LKINETIC) $(TBDIR) # $(TESTDIR) $(LGTEST)
5052

51-
test: $(TESTDIR)
52-
5353
dist: all
5454
@( \
5555
cd $(BUILDDIR); \
@@ -69,9 +69,6 @@ $(BUILDDIR):
6969
$(TBDIR): FORCE
7070
(cd $@; BUILDDIR=$(BUILDDIR) make -e all install)
7171

72-
$(TESTDIR): FORCE
73-
(cd $@; BUILDDIR=$(BUILDDIR) make -e all install)
74-
7572
$(LPROTOBUF):
7673
(cd $(PROTOBUFDIR); [ ! -f ./configure ] && ./autogen.sh; true)
7774
(cd $(PROTOBUFDIR); [ ! -f ./Makefile ] && ./configure --prefix=$(BUILDDIR); true)
@@ -84,10 +81,6 @@ $(LLIST):
8481
$(LKINETIC): FORCE
8582
(cd $(SRCDIR); BUILDDIR=$(BUILDDIR) make -e all install)
8683

87-
$(LGTEST): FORCE
88-
(cd $(GTESTDIR); BUILDDIR=$(BUILDDIR) bazel build gtest)
89-
/usr/bin/install -c -m 755 $(GTESTDIR)/bazel-bin/libgtest.a $(BUILDLIB)
90-
9184
# The sanity target only works if you have a kineticd server running locally.
9285
sanity:
9386
(cd $(KCTLDIR); make all sanity)
@@ -108,24 +101,38 @@ listclean:
108101
kineticclean:
109102
(cd $(SRCDIR); make clean)
110103

111-
gtestclean:
112-
(cd $(GTESTDIR); bazel clean)
113-
114104
toolboxclean:
115105
(cd $(TBDIR); make clean)
116106

117-
testclean:
118-
(cd $(TESTDIR); make clean)
119-
120107
distclean:
121108
(cd $(PROTOBUFDIR); [ -f ./Makefile ] && make distclean; true)
122109
(cd $(LISTDIR); make clean)
123110
(cd $(SRCDIR); make clean)
124-
(cd $(GTESTDIR); bazel clean)
125111
(cd $(TBDIR); make clean)
126-
(cd $(TESTDIR); make clean)
112+
# (cd $(TESTDIR); make clean)
113+
# (cd $(GTESTDIR); bazel clean)
127114
rm -rf $(BUILDDIR)
128115

129116
.PHONY: FORCE
130117
FORCE:
131118

119+
120+
# ------------------------------
121+
# Deprecated portions, here for reference (and to make bringing it back in the future easier)
122+
123+
# We are deprecating googletest unit tests for now
124+
# $(LGTEST): FORCE
125+
# (cd $(GTESTDIR); BUILDDIR=$(BUILDDIR) bazel build gtest)
126+
# /usr/bin/install -c -m 755 $(GTESTDIR)/bazel-bin/libgtest.a $(BUILDLIB)
127+
128+
# gtestclean:
129+
# (cd $(GTESTDIR); bazel clean)
130+
131+
# Deprecating the test directory, which will only contain google tests
132+
# test: $(TESTDIR)
133+
134+
# $(TESTDIR): FORCE
135+
# (cd $@; BUILDDIR=$(BUILDDIR) make -e all install)
136+
137+
# testclean:
138+
# (cd $(TESTDIR); make clean)

0 commit comments

Comments
 (0)