Skip to content

Commit

Permalink
video/logo: do not generate unneeded logo C files
Browse files Browse the repository at this point in the history
Currently, all the logo C files are generated irrespective of the
CONFIG options. Adding them to extra-y is wrong. What we need to do
here is to add them to 'targets' so that if_changed works properly.

Files listed in 'targets' are cleaned, so clean-files is unneeded.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
  • Loading branch information
masahir0y committed Oct 5, 2019
1 parent a9bbe79 commit 01bb251
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions drivers/video/logo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,6 @@ obj-$(CONFIG_SPU_BASE) += logo_spe_clut224.o

# How to generate logo's

# Use logo-cfiles to retrieve list of .c files to be built
logo-cfiles = $(notdir $(patsubst %.$(2), %.c, \
$(wildcard $(srctree)/$(src)/*$(1).$(2))))


# Mono logos
extra-y += $(call logo-cfiles,_mono,pbm)

# VGA16 logos
extra-y += $(call logo-cfiles,_vga16,ppm)

# 224 Logos
extra-y += $(call logo-cfiles,_clut224,ppm)

# Gray 256
extra-y += $(call logo-cfiles,_gray256,pgm)

pnmtologo := scripts/pnmtologo

# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
Expand All @@ -55,5 +38,5 @@ $(obj)/%_clut224.c: $(src)/%_clut224.ppm $(pnmtologo) FORCE
$(obj)/%_gray256.c: $(src)/%_gray256.pgm $(pnmtologo) FORCE
$(call if_changed,logo)

# Files generated that shall be removed upon make clean
clean-files := *_mono.c *_vga16.c *_clut224.c *_gray256.c
# generated C files
targets += *_mono.c *_vga16.c *_clut224.c *_gray256.c

0 comments on commit 01bb251

Please sign in to comment.