Add `dirs' target.
[pintos-anon] / src / Makefile.kernel
index fe63d5273174e5a00a21bb57ca2a8a2db508d9d2..e31d51360ab12da6160509caf1d51c0e485f0d87 100644 (file)
@@ -1,17 +1,18 @@
+# -*- makefile -*-
+
 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