From 09c444753aa120fc092a83d250a1f6c22e7835fc Mon Sep 17 00:00:00 2001
From: Yorhel <git@yorhel.nl>
Date: Thu, 25 Apr 2013 08:11:39 +0200
Subject: [PATCH] Move khash & yopt to deps/

Both microlibraries come from another source, and are not maintained as
part of ncdu. This separation of src/ and deps/ makes the relation more
clear.
---
 Makefile.am           | 7 ++++---
 {src => deps}/khash.h | 0
 {src => deps}/yopt.h  | 0
 src/dir_mem.c         | 3 ++-
 src/main.c            | 2 +-
 5 files changed, 7 insertions(+), 5 deletions(-)
 rename {src => deps}/khash.h (100%)
 rename {src => deps}/yopt.h (100%)

diff --git a/Makefile.am b/Makefile.am
index 1ff63c2..04dd5dd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,4 @@
+AM_CPPFLAGS=-I$(srcdir)/deps
 bin_PROGRAMS=ncdu
 
 ncdu_SOURCES=\
@@ -16,6 +17,8 @@ ncdu_SOURCES=\
 	src/util.c
 
 noinst_HEADERS=\
+	deps/yopt.h\
+	deps/khash.h\
 	src/browser.h\
 	src/delete.h\
 	src/dir.h\
@@ -23,10 +26,8 @@ noinst_HEADERS=\
 	src/exclude.h\
 	src/global.h\
 	src/help.h\
-	src/khash.h\
 	src/path.h\
-	src/util.h\
-	src/yopt.h
+	src/util.h
 
 
 man_MANS=ncdu.1
diff --git a/src/khash.h b/deps/khash.h
similarity index 100%
rename from src/khash.h
rename to deps/khash.h
diff --git a/src/yopt.h b/deps/yopt.h
similarity index 100%
rename from src/yopt.h
rename to deps/yopt.h
diff --git a/src/dir_mem.c b/src/dir_mem.c
index d13ba24..888d698 100644
--- a/src/dir_mem.c
+++ b/src/dir_mem.c
@@ -24,11 +24,12 @@
 */
 
 #include "global.h"
-#include "khash.h"
 
 #include <string.h>
 #include <stdlib.h>
 
+#include <khash.h>
+
 
 static struct dir *root;   /* root directory struct we're scanning */
 static struct dir *curdir; /* directory item that we're currently adding items to */
diff --git a/src/main.c b/src/main.c
index 6084edc..c795114 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,7 +34,7 @@
 #include <sys/time.h>
 #include <locale.h>
 
-#include "yopt.h"
+#include <yopt.h>
 
 
 int pstate;
-- 
GitLab