Add `dirs' target.
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 6 Apr 2005 18:44:37 +0000 (18:44 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 6 Apr 2005 18:44:37 +0000 (18:44 +0000)
Simplify and improve.

src/Makefile.kernel

index 181eb23da70f61491b8cd96578bba7f800180eb0..e31d51360ab12da6160509caf1d51c0e485f0d87 100644 (file)
@@ -2,18 +2,17 @@
 
 include Make.vars
 BUILD_SUBDIRS = $(addprefix build/, $(SUBDIRS))
-CP = cp
-MKDIR = mkdir
 
-all: build build/Makefile $(BUILD_SUBDIRS)
+all: dirs
        $(MAKE) -C build
 
-$(BUILD_SUBDIRS):
-       $(MKDIR) $@
+dirs: build build/Makefile $(BUILD_SUBDIRS)
 build:
-       $(MKDIR) $@
+       mkdir $@
 build/Makefile: ../Makefile.build
-       $(CP) $< $@
+       cp $< $@
+$(BUILD_SUBDIRS):
+       mkdir $@
 
 clean:
        rm -rf build