From 10e560a9a6cbcc8ebac69b43a5ee654f2947fd5d Mon Sep 17 00:00:00 2001
From: Yorhel <git@yorhel.nl>
Date: Mon, 21 May 2012 15:27:41 +0200
Subject: [PATCH] Use top-level automake build + removed AUTHORS, INSTALL and
 NEWS

A more modern and practical structure.
---
 AUTHORS         |  2 --
 INSTALL         |  5 -----
 Makefile.am     | 35 ++++++++++++++++++++++++++++++++++-
 NEWS            |  1 -
 README          |  6 ++++++
 autogen.sh      |  7 -------
 configure.in    |  6 ++----
 doc/Makefile.am |  7 -------
 src/Makefile.am |  5 -----
 9 files changed, 42 insertions(+), 32 deletions(-)
 delete mode 100644 AUTHORS
 delete mode 100644 INSTALL
 delete mode 120000 NEWS
 delete mode 100755 autogen.sh
 delete mode 100644 doc/Makefile.am
 delete mode 100644 src/Makefile.am

diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index 5dbad17..0000000
--- a/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-ncdu is written by Yoran Heling <projects@yorhel.nl>
-The khash library is written by Attractive Chaos <attractor@live.co.uk>.
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index fa04b7e..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,5 +0,0 @@
-The usual:
- 
-  ./configure --prefix=/usr
-  make
-  make install
diff --git a/Makefile.am b/Makefile.am
index 3920780..925056b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1 +1,34 @@
-SUBDIRS = src doc
+bin_PROGRAMS=ncdu
+
+ncdu_SOURCES=\
+	src/browser.c\
+	src/calc.c\
+	src/delete.c\
+	src/dirlist.c\
+	src/exclude.c\
+	src/help.c\
+	src/main.c\
+	src/path.c\
+	src/util.c
+
+noinst_HEADERS=\
+	src/browser.h\
+	src/calc.h\
+	src/delete.h\
+	src/dirlist.h\
+	src/exclude.h\
+	src/global.h\
+	src/help.h\
+	src/khash.h\
+	src/path.h\
+	src/util.h
+
+
+man_MANS=ncdu.1
+EXTRA_DIST=ncdu.1 doc/ncdu.pod
+
+# Don't "clean" ncdu.1, it should be in the tarball so that pod2man isn't a
+# build dependency for those who use the tarball.
+ncdu.1: $(srcdir)/doc/ncdu.pod Makefile
+	pod2man --center "ncdu manual" --release "@PACKAGE@-@VERSION@" "$(srcdir)/doc/ncdu.pod" >ncdu.1
+
diff --git a/NEWS b/NEWS
deleted file mode 120000
index b0936e8..0000000
--- a/NEWS
+++ /dev/null
@@ -1 +0,0 @@
-ChangeLog
\ No newline at end of file
diff --git a/README b/README
index a9bbdf1..4755dba 100644
--- a/README
+++ b/README
@@ -25,6 +25,12 @@ INSTALL
     make
     make install
 
+  If you're building directly from the git repository, make sure you have perl
+  (or rather, pod2man) and GNU autoconf/automake installed, then run
+  'autoreconf -i', and you're ready to continue with the usual ./configure and
+  make route.
+
+
 COPYING
 
   Copyright (c) 2007-2012 Yoran Heling
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 141f4ac..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-# autogen.sh - creates configure scripts and more
-# requires autoconf
-
-aclocal
-autoheader
-automake -a
-autoconf
diff --git a/configure.in b/configure.in
index 72377de..d45d510 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@
 AC_INIT(ncdu, 1.8g, projects@yorhel.nl)
 AC_CONFIG_SRCDIR([src/global.h])
 AC_CONFIG_HEADER([config.h])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([foreign subdir-objects])
 
 # Check for programs.
 AC_PROG_CC
@@ -47,7 +47,5 @@ AC_CHECK_LIB([$ncurses],
 
 
 
-AC_OUTPUT([Makefile src/Makefile doc/Makefile])
+AC_OUTPUT([Makefile])
 
-echo ""
-echo "Now type \"make\" and \"make install\" to build and install ncdu"
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index bca002f..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-man_MANS = ncdu.1
-EXTRA_DIST = ncdu.1 ncdu.pod
-
-# Don't "clean" ncdu.1, it should be in the tarball so that pod2man isn't a
-# build dependency for those who use the tarball.
-ncdu.1: ncdu.pod Makefile
-	pod2man --center "ncdu manual" --release "@PACKAGE@-@VERSION@" ncdu.pod >ncdu.1
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index cf34d94..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-bin_PROGRAMS = ncdu
-
-ncdu_SOURCES = browser.c calc.c delete.c dirlist.c exclude.c help.c main.c path.c util.c
-
-noinst_HEADERS = browser.h calc.h delete.h dirlist.h exclude.h global.h help.h path.h util.h khash.h
-- 
GitLab