Question about PHONY

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

 



Dear all:
I read the document about make recently.
I have some questions:
1. in example 1 list below that excerpted from document, there are 2
disadvantages:
   1. Cannot see the error.
   2. Cannot use parallel execution.
So the doc uses modification 1 to fix them, but if I use modification 2, I
will also fix them, right? Except I cannot force make to rerun it every
time, if there is already a file called subdirs. 

Appreciate your help,
vichy

Example1:
SUBDIRS = foo bar baz
subdirs:
	for dir in $(SUBDIRS); do \
	$(MAKE) -C $$dir; \
	done

Modification 1:
SUBDIRS = foo bar baz
.PHONY: subdirs $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
	$(MAKE) -C $@
foo: baz

modification 2:
SUBDIRS = foo bar baz
.PHONY: $(SUBDIRS)
subdirs: $(SUBDIRS)
$(SUBDIRS):
	$(MAKE) -C $@
foo: baz




--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux