| Subject: [PATCH 2/2] Makefile: Exclude .h files from target rule |
| |
| This ensures that src/_features.h is not added to compiler cmdline which |
| can confuse the compilers e.g. clang as it may not like .h as valid input |
| and complain |
| |
| | clang-11: error: cannot specify -o when generating multiple output files |
| | make: *** [Makefile:50: netplan-dbus] Error 1 |
| | make: *** Waiting for unfinished jobs.... |
| |
| Upstream-Status: Submitted [https://github.com/CanonicalLtd/netplan/pull/175] |
| Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| --- |
| Makefile | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/Makefile b/Makefile |
| index 4fa6bd8..567d326 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -46,7 +46,7 @@ generate: libnetplan.so.$(NETPLAN_SOVER) nm.o networkd.o openvswitch.o generate. |
| $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L. -lnetplan `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` |
| |
| netplan-dbus: src/dbus.c src/_features.h util.o |
| - $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0 gio-2.0` |
| + $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(patsubst %.h,,$^) `pkg-config --cflags --libs libsystemd glib-2.0 gio-2.0` |
| |
| src/_features.h: src/[^_]*.[hc] |
| printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {\n" > $@ |
| -- |
| 2.25.1 |
| |