help-gnu-utils
[Top][All Lists]
Advanced

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

make-3.81 question (diff)


From: James
Subject: make-3.81 question (diff)
Date: 13 Apr 2006 11:34:56 -0700
User-agent: G2/0.2

In this example,
sub/q.d is same as sub2/q.d
sub/z.d is different from sub2/z.d

target def's output is what I expect.
target all's output is not. I expect
q.d same
z.d diff

How do I fix?

$ cat makefile
define Diff
$(shell diff $(1) $(2) 1>/dev/null 2>&1; [ $$? -ne 0 ] && echo 1)
endef

all: def
        for f in q.d z.d; do echo $$f $(if $(call
Diff,sub/$$f,sub2),diff,same); done

def:
        @echo q.d $(call Diff,sub/q.d,sub2)
        @echo z.d $(call Diff,sub/z.d,sub2)

$ make
q.d
z.d 1
for f in q.d z.d; do echo $f diff; done
q.d diff
z.d diff


Thanks
James



reply via email to

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