Commit ba824193 authored by Kinsbursky Stanislav's avatar Kinsbursky Stanislav Committed by Pavel Emelyanov

make: make "all" as phony target

Also, .PHONY have to be specified prior to desired goals,
And it's better to have one line for all goals instead on one line per goal.
Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9f7b6189
...@@ -61,6 +61,8 @@ DEPS := $(patsubst %.o,%.d,$(OBJS)) ...@@ -61,6 +61,8 @@ DEPS := $(patsubst %.o,%.d,$(OBJS))
include Makefile.syscall include Makefile.syscall
include Makefile.pie include Makefile.pie
.PHONY: all test-legacy zdtm test rebuild clean distclean tags cscope docs help
all: $(PROGRAM) all: $(PROGRAM)
%.o: %.c %.o: %.c
...@@ -86,22 +88,18 @@ $(PROGRAM): $(OBJS) ...@@ -86,22 +88,18 @@ $(PROGRAM): $(OBJS)
test-legacy: $(PROGRAM) test-legacy: $(PROGRAM)
$(Q) $(MAKE) -C test/legacy all $(Q) $(MAKE) -C test/legacy all
.PHONY: test-legacy
zdtm: $(PROGRAM) zdtm: $(PROGRAM)
$(Q) $(MAKE) -C test/zdtm all $(Q) $(MAKE) -C test/zdtm all
.PHONY: zdtm
test: zdtm test: zdtm
$(Q) $(SH) test/zdtm.sh $(Q) $(SH) test/zdtm.sh
.PHONY: test
rebuild: rebuild:
$(E) " FORCE-REBUILD" $(E) " FORCE-REBUILD"
$(Q) $(RM) -f ./*.o $(Q) $(RM) -f ./*.o
$(Q) $(RM) -f ./*.d $(Q) $(RM) -f ./*.d
$(Q) $(MAKE) $(Q) $(MAKE)
.PHONY: rebuild
clean: cleanpie cleansyscall clean: cleanpie cleansyscall
$(E) " CLEAN" $(E) " CLEAN"
...@@ -118,29 +116,24 @@ clean: cleanpie cleansyscall ...@@ -118,29 +116,24 @@ clean: cleanpie cleansyscall
$(Q) $(MAKE) -C test/zdtm clean $(Q) $(MAKE) -C test/zdtm clean
$(Q) $(MAKE) -C test/zdtm cleanout $(Q) $(MAKE) -C test/zdtm cleanout
$(Q) $(MAKE) -C Documentation clean $(Q) $(MAKE) -C Documentation clean
.PHONY: clean
distclean: clean distclean: clean
$(E) " DISTCLEAN" $(E) " DISTCLEAN"
$(Q) $(RM) -f ./tags $(Q) $(RM) -f ./tags
$(Q) $(RM) -f ./cscope* $(Q) $(RM) -f ./cscope*
.PHONY: distclean
tags: tags:
$(E) " GEN" $@ $(E) " GEN" $@
$(Q) $(RM) -f tags $(Q) $(RM) -f tags
$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' -print | xargs ctags -a $(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' -print | xargs ctags -a
.PHONY: tags
cscope: cscope:
$(E) " GEN" $@ $(E) " GEN" $@
$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' -print > cscope.files $(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' -print > cscope.files
$(Q) $(CSCOPE) -bkqu $(Q) $(CSCOPE) -bkqu
.PHONY: cscope
docs: docs:
$(Q) $(MAKE) -s -C Documentation all $(Q) $(MAKE) -s -C Documentation all
.PHONY: docs
help: help:
$(E) ' Targets:' $(E) ' Targets:'
...@@ -153,7 +146,6 @@ help: ...@@ -153,7 +146,6 @@ help:
$(E) ' cscope - Generate cscope database' $(E) ' cscope - Generate cscope database'
$(E) ' rebuild - Force-rebuild of [*] targets' $(E) ' rebuild - Force-rebuild of [*] targets'
$(E) ' test - Run zdtm test-suite' $(E) ' test - Run zdtm test-suite'
.PHONY: help
deps-targets := %.o %.s %.i $(PROGRAM) zdtm test-legacy deps-targets := %.o %.s %.i $(PROGRAM) zdtm test-legacy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment