Skip to content

Commit 63c8591

Browse files
netoptimizerborkmann
authored andcommitted
libbpf: cleanup Makefile, remove unused elements
The plugin_dir_SQ variable is not used, remove it. The function update_dir is also unused, remove it. The variable $VERSION_FILES is empty, remove it. These all originates from the introduction of the Makefile, and is likely a copy paste from tools/lib/traceevent/Makefile. Fixes: 1b76c13 ("bpf tools: Introduce 'bpf' library and add bpf feature check") Signed-off-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 7d386c6 commit 63c8591

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

tools/lib/bpf/Makefile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export prefix libdir src obj
9393
# Shell quotes
9494
libdir_SQ = $(subst ','\'',$(libdir))
9595
libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
96-
plugin_dir_SQ = $(subst ','\'',$(plugin_dir))
9796

9897
LIB_FILE = libbpf.a libbpf.so
9998

@@ -150,7 +149,7 @@ CMD_TARGETS = $(LIB_FILE)
150149

151150
TARGETS = $(CMD_TARGETS)
152151

153-
all: fixdep $(VERSION_FILES) all_cmd
152+
all: fixdep all_cmd
154153

155154
all_cmd: $(CMD_TARGETS)
156155

@@ -169,16 +168,6 @@ $(OUTPUT)libbpf.so: $(BPF_IN)
169168
$(OUTPUT)libbpf.a: $(BPF_IN)
170169
$(QUIET_LINK)$(RM) $@; $(AR) rcs $@ $^
171170

172-
define update_dir
173-
(echo $1 > $@.tmp; \
174-
if [ -r $@ ] && cmp -s $@ $@.tmp; then \
175-
rm -f $@.tmp; \
176-
else \
177-
echo ' UPDATE $@'; \
178-
mv -f $@.tmp $@; \
179-
fi);
180-
endef
181-
182171
define do_install
183172
if [ ! -d '$(DESTDIR_SQ)$2' ]; then \
184173
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \
@@ -204,7 +193,7 @@ config-clean:
204193
$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null
205194

206195
clean:
207-
$(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd \
196+
$(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so .*.d .*.cmd \
208197
$(RM) LIBBPF-CFLAGS
209198
$(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf
210199

0 commit comments

Comments
 (0)