I have the following Makefile to extract tar files. However, it will
always extract all the tar files. I could add touch $@ after tar xzvf
$<. But I prefer not to do so. Because I don't want change the date of
the extracted package.

I'm wondering if there is any walkaround to not to update these rules
as long as the targets exist.

.PHONY: all

TAR_GZ_FILES:=$(wildcard *.tar.gz)
DIRS:=$(patsubst %.tar.gz,%,$(TAR_GZ_FILES))

all: $(DIRS)

$(DIRS): %: %.tar.gz
        tar xzvf $<


-- 
Regards,
Peng

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to