Makefile.am: remove duplicated rules for efi
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Apr 2017 03:27:55 +0000 (23:27 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 21 Apr 2017 16:05:55 +0000 (12:05 -0400)
Specifying the same rule with a slightly different dep list was not useful,
since make cannot distinguish rules with the same input / output. (It possibly
could have two rules with different dependency list, but here all dependencies
that are different between the two rules are always present, so the two rules
are effectively the same.)

Makefile.am

index f8c7c1e..4ba2305 100644 (file)
@@ -2990,22 +2990,24 @@ endif
 endif
 
 # ------------------------------------------------------------------------------
-systemd_boot_headers = \
-       src/boot/efi/util.h \
+efi_headers = \
        src/boot/efi/console.h \
+       src/boot/efi/disk.h \
        src/boot/efi/graphics.h \
-       src/boot/efi/pefile.h \
+       src/boot/efi/linux.h \
        src/boot/efi/measure.h \
-       src/boot/efi/disk.h
+       src/boot/efi/pefile.h \
+       src/boot/efi/splash.h \
+       src/boot/efi/util.h
 
 systemd_boot_sources = \
-       src/boot/efi/util.c \
+       src/boot/efi/boot.c \
        src/boot/efi/console.c \
-       src/boot/efi/graphics.c \
-       src/boot/efi/pefile.c \
        src/boot/efi/disk.c \
+       src/boot/efi/graphics.c \
        src/boot/efi/measure.c \
-       src/boot/efi/boot.c
+       src/boot/efi/pefile.c \
+       src/boot/efi/util.c
 
 EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
 
@@ -3017,7 +3019,7 @@ if ENABLE_EFI
 if HAVE_GNUEFI
 bootlib_DATA = $(systemd_boot)
 
-$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
+$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(efi_headers))
        @$(MKDIR_P) $(top_builddir)/src/boot/efi/
        $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
 
@@ -3035,24 +3037,15 @@ endif
 CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
 
 # ------------------------------------------------------------------------------
-stub_headers = \
-       src/boot/efi/util.h \
-       src/boot/efi/pefile.h \
-       src/boot/efi/disk.h \
-       src/boot/efi/graphics.h \
-       src/boot/efi/splash.h \
-       src/boot/efi/measure.h \
-       src/boot/efi/linux.h
-
 stub_sources = \
-       src/boot/efi/util.c \
-       src/boot/efi/pefile.c \
        src/boot/efi/disk.c \
        src/boot/efi/graphics.c \
-       src/boot/efi/splash.c \
        src/boot/efi/linux.c \
        src/boot/efi/measure.c \
-       src/boot/efi/stub.c
+       src/boot/efi/pefile.c \
+       src/boot/efi/splash.c \
+       src/boot/efi/stub.c \
+       src/boot/efi/util.c
 
 EXTRA_DIST += \
        $(stub_sources) \
@@ -3067,10 +3060,6 @@ if ENABLE_EFI
 if HAVE_GNUEFI
 bootlib_DATA += $(stub)
 
-$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
-       @$(MKDIR_P) $(top_builddir)/src/boot/efi/
-       $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
-
 $(stub_solib): $(stub_objects)
        $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
                -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \