]> Devi Nivas Git - cs3210-lab1.git/commitdiff
Prevent extra rebuild of fs.img by keeping intermediate object files.
authorCam Tenny <cjtenny@mit.edu>
Wed, 24 Oct 2012 22:52:40 +0000 (18:52 -0400)
committerCam Tenny <cjtenny@mit.edu>
Wed, 24 Oct 2012 22:52:40 +0000 (18:52 -0400)
Makefile

index 33bfb0aef0abdb35e10edf5a921550fbc772820e..20cb884d0c8fde5420039c6a8a74ad6a7aa5af4c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -148,6 +148,12 @@ _forktest: forktest.o $(ULIB)
 mkfs: mkfs.c fs.h
        gcc -Werror -Wall -o mkfs mkfs.c
 
+# Prevent deletion of intermediate files, e.g. cat.o, after first build, so
+# that disk image changes after first build are persistent until clean.  More
+# details:
+# http://www.gnu.org/software/make/manual/html_node/Chained-Rules.html
+.PRECIOUS: %.o
+
 UPROGS=\
        _cat\
        _echo\