What is the difference between “make” and “make all”?
2014-01-22 16:07
633 查看
I have a Makefile with the following structure (working example)..PHONY: image flashcard put-files put-files: @echo "=== put-files" image: @echo "=== image" flashcard: @echo "=== flashcard" all: put-files image flashcard @echo "Done" I expect that a simple makewould build all three targets, but this is not so: % make === put-files But if I explicitly specify the target, the dependencies are built as well: % make all === put-files === image === flashcard Done What am I doing wrong? makefile gnu-make
| |||
add comment | |||
start a bounty |
1 Answer
activeoldest
votes
up vote 4 down vote accepted | A simple makewill build the first target in the list, which is put-files. make allwill build the target all. If you want allto be the default, then move it to the top of the list. To understand what the .PHONYdoes, see http://www.gnu.org/s/hello/manual/make/Phony-Targets.html |
相关文章推荐
- What is the difference between Simple, Advanced and Parameter data sets?
- What is the difference between g++ and gcc?
- Sql 中having 和where的区别 SQL hardest question What is the difference between the WHERE and HAVING claus
- What is the difference between initWithCoder:, initWithNibName:, and awakeFromNib?
- what is the difference between ELF files and bin files
- What is the difference between SLC and MLC?
- What is the difference between XHTML MP, XHTML Basic, WML, i-mode, and HDML?
- What is the difference between Full load and Incremental load
- Multi-thread: What is the difference between OpenMP and MPI
- What is the Differences Between Sleep/Standby and Hibernate
- What is the difference between Binding and TemplateBinding?
- What is the difference between /dev/ttyUSB and /dev/ttyACM?
- What is the difference between syntax and semantic
- What is the difference between wc -1 < mydata.dat and wc -1 < mydata.dat ?
- What is the difference between an EXE and a DLL?
- What is the difference between XML and C or C ?
- what is the difference between little-endian and big-endian.
- What is the difference between BIT and TINYINT in MySQL
- Multi-thread: What is the difference between OpenMP and MPI
- What Is the Difference Between a Block, a Proc, and a Lambda in Ruby