Makefileon commit Add a "checkout-cache" command which does what the name suggests. (33db5f4)
   1CFLAGS=-g -O3 -Wall
   2CC=gcc
   3
   4PROG=   update-cache show-diff init-db write-tree read-tree commit-tree \
   5        cat-file fsck-cache checkout-cache
   6
   7all: $(PROG)
   8
   9install: $(PROG)
  10        install $(PROG) $(HOME)/bin/
  11
  12LIBS= -lssl -lz
  13
  14init-db: init-db.o
  15
  16update-cache: update-cache.o read-cache.o
  17        $(CC) $(CFLAGS) -o update-cache update-cache.o read-cache.o $(LIBS)
  18
  19show-diff: show-diff.o read-cache.o
  20        $(CC) $(CFLAGS) -o show-diff show-diff.o read-cache.o $(LIBS)
  21
  22write-tree: write-tree.o read-cache.o
  23        $(CC) $(CFLAGS) -o write-tree write-tree.o read-cache.o $(LIBS)
  24
  25read-tree: read-tree.o read-cache.o
  26        $(CC) $(CFLAGS) -o read-tree read-tree.o read-cache.o $(LIBS)
  27
  28commit-tree: commit-tree.o read-cache.o
  29        $(CC) $(CFLAGS) -o commit-tree commit-tree.o read-cache.o $(LIBS)
  30
  31cat-file: cat-file.o read-cache.o
  32        $(CC) $(CFLAGS) -o cat-file cat-file.o read-cache.o $(LIBS)
  33
  34fsck-cache: fsck-cache.o read-cache.o
  35        $(CC) $(CFLAGS) -o fsck-cache fsck-cache.o read-cache.o $(LIBS)
  36
  37checkout-cache: checkout-cache.o read-cache.o
  38        $(CC) $(CFLAGS) -o checkout-cache checkout-cache.o read-cache.o $(LIBS)
  39
  40read-cache.o: cache.h
  41show-diff.o: cache.h
  42
  43clean:
  44        rm -f *.o $(PROG) temp_git_file_*
  45
  46backup: clean
  47        cd .. ; tar czvf dircache.tar.gz dir-cache