help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

prerequisite ignored when running 'make' (alone)


From: Federico Bruni
Subject: prerequisite ignored when running 'make' (alone)
Date: Tue, 09 May 2017 14:06:36 +0200

Hi all

Please consider the following example:


### Makefile ###
all: doc

dependencies = $(shell find docs -type f)

doc: $(dependencies)
        echo "Something has changed in the docs/ directory!"

### end ###


It looks up the files in the docs/ directory and executes the doc target if any file is changed.
If I run 'make doc', it behaves as expected.
If I run 'make', the target is executed every time, even if no file changed in docs/.

I guess I'm doing something stupid here, but I cannot figure it out.

Thanks in advance
Federico






reply via email to

[Prev in Thread] Current Thread [Next in Thread]