Skip to content

Commit 6c07100

Browse files
Jiri Bencborkmann
authored andcommitted
tools: bpf: make install should build first
Make the 'install' target depend on the 'all' target to build the binaries first. Signed-off-by: Jiri Benc <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent fde68c5 commit 6c07100

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/bpf/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ $(OUTPUT)%.lex.c: $(srctree)/tools/bpf/%.l
5050
$(OUTPUT)%.o: $(srctree)/tools/bpf/%.c
5151
$(COMPILE.c) -o $@ $<
5252

53-
all: $(OUTPUT)bpf_jit_disasm $(OUTPUT)bpf_dbg $(OUTPUT)bpf_asm bpftool
53+
PROGS = $(OUTPUT)bpf_jit_disasm $(OUTPUT)bpf_dbg $(OUTPUT)bpf_asm
54+
55+
all: $(PROGS) bpftool
5456

5557
$(OUTPUT)bpf_jit_disasm: CFLAGS += -DPACKAGE='bpf_jit_disasm'
5658
$(OUTPUT)bpf_jit_disasm: LDLIBS = -lopcodes -lbfd -ldl
@@ -67,7 +69,7 @@ clean: bpftool_clean
6769
rm -rf $(OUTPUT)*.o $(OUTPUT)bpf_jit_disasm $(OUTPUT)bpf_dbg \
6870
$(OUTPUT)bpf_asm $(OUTPUT)bpf_exp.yacc.* $(OUTPUT)bpf_exp.lex.*
6971

70-
install: bpftool_install
72+
install: $(PROGS) bpftool_install
7173
$(INSTALL) -m 0755 -d $(DESTDIR)$(prefix)/bin
7274
$(INSTALL) $(OUTPUT)bpf_jit_disasm $(DESTDIR)$(prefix)/bin/bpf_jit_disasm
7375
$(INSTALL) $(OUTPUT)bpf_dbg $(DESTDIR)$(prefix)/bin/bpf_dbg

0 commit comments

Comments
 (0)