From 33db2021ff3f862d414878f13ac677e623514c99 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sat, 16 May 2020 11:48:05 +0300 Subject: [PATCH 1/2] install: missing ) and ; for the install target Signed-off-by: Tzafrir Cohen --- defs.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defs.mk b/defs.mk index 3616db0..87f362f 100644 --- a/defs.mk +++ b/defs.mk @@ -57,8 +57,8 @@ clean: install: all install -d $(DESTDIR)$(binpath) install -d $(DESTDIR)$(libdir) - $(foreach p, $(progs), install $(p) $(DESTDIR)$(binpath)) - $(foreach l, $(libs), install $(l) $(DESTDIR)$(libdir) + $(foreach p, $(progs), install $(p) $(DESTDIR)$(binpath);) + $(foreach l, $(libs), install $(l) $(DESTDIR)$(libdir);) $(objs): .build_profile .build_profile:: From a961e906639864d2a1a5d063f413e9db5d2582e7 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sat, 16 May 2020 11:48:41 +0300 Subject: [PATCH 2/2] Makefiles: avoid target override warning Have separate types: "bins" and "progs": * ibsim-run is a script and should not be built like other programs. * The test programs are not installed. Signed-off-by: Tzafrir Cohen --- defs.mk | 2 +- ibsim/Makefile | 4 +++- tests/Makefile | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/defs.mk b/defs.mk index 87f362f..68dd71b 100644 --- a/defs.mk +++ b/defs.mk @@ -42,7 +42,7 @@ all: %.so: $(CC) -shared $(LDFLAGS) -o $@ $^ $(LIBS) -$(progs): %: +$(bins): %: $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) dep: diff --git a/ibsim/Makefile b/ibsim/Makefile index c0e1e67..73f92e9 100644 --- a/ibsim/Makefile +++ b/ibsim/Makefile @@ -1,4 +1,6 @@ -progs:=ibsim ibsim-run +bins:=ibsim +scripts:=ibsim-run +progs:=$(bins) $(scrips) -include ../defs.mk diff --git a/tests/Makefile b/tests/Makefile index a48cfc4..0c90cca 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,7 +1,7 @@ -progs:= subnet_discover query_many mcast_storm +bins:= subnet_discover query_many mcast_storm -include ../defs.mk -all: $(progs) +all: $(bins) -$(progs): %: %.o +$(bins): %: %.o