[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dumb Questions
From: |
Lee Eric |
Subject: |
Dumb Questions |
Date: |
Sun, 10 Nov 2019 23:18:55 -0800 |
Hi,
New to Make and after reading some pages from the GNU Make book I'm
confused about some explanations.
1. From the O'Reilly book it mentions "Normally, phony targets will be
always be executed ...". I don't quite follow it as "clean" is a
typical phony target but it's not executed every time until we tell
Make. So my question is, if a Makefile has multiple targets, what's
the rule of Make to process the targets? Because after reading the
book I have no idea what targets would be executed.
2. What's the actual/practical use of Empty Targets? The example in that book is
prog: size prog.o
$(CC) $(LDFLAGS) -o $@ $^
size: prog.o
size $^
touch size
but I didn't see the use of that size target, because even I change it to
prog: prog.o
$(CC) $(LDFLAGS) -o $@ $^
is still valid. So why we need to use empty targets?
Thanks and I do really appreciate someone who can give me details about those.
Eric
- Dumb Questions,
Lee Eric <=