Do not use for loop in data/frames/Makefile
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Fri, 2 Sep 2016 14:15:13 +0000 (16:15 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tue, 6 Sep 2016 22:01:28 +0000 (01:01 +0300)
This construct depends on the shell used and do not work for all shells.
Instead use make rules to find and extract all *.pnm.gz frames.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
data/frames/Makefile

index dba2799..37c284f 100644 (file)
@@ -1,13 +1,15 @@
+frames=$(patsubst %.pnm.gz,%.pnm,$(wildcard *.pnm.gz))
+
 all:
        ./gen-lut.py
 
 clean:
        @rm -f *.bin
 
-install:
+%.pnm: %.pnm.gz
+       gzip -dk $<
+
+install: $(frames)
        mkdir -p $(INSTALL_DIR)/frames/
-       for frame in *.pnm.gz ; do
-               gzip -dk $(frame)
-               mv ${frame/.gz/} $(INSTALL_DIR)/frames/
-       done
+       mv $(frames) $(INSTALL_DIR)/frames/
        cp *.bin $(INSTALL_DIR)/frames/