From 6940014c42372033c2f765ce6d2b71300b4b9288 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Sun, 20 May 2012 17:27:14 +1000 Subject: [PATCH] Makefile.am fixes Two problems. 1) skill/snice : distribution doesnt mean install If you don't set your configure flags right, you dont install the skill/snice man pages which means you will break any subsequent compiles with the flags enabled. Man pages not to be installed should still be distributed. 2) The git version into Makefile.am breaks under certain conditions. The easy break for this is: touch aclocal.m4 make We need this script added plus some dist hook magic that got left out. --- Makefile.am | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index ec2f12af..45aad49b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,10 +43,21 @@ dist_man_MANS = \ vmstat.8 \ w.1 +EXTRA_DIST = \ + autogen.sh \ + contrib \ + COPYING.LIB \ + misc/git-version-gen \ + Documentation/CodingStyle \ + Documentation/TODO \ + $(sysconf_DATA) + if BUILD_KILL bin_PROGRAMS = kill dist_man_MANS += kill.1 kill_SOURCES = skill.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c +else + EXTRA_DIST += kill.1 endif if WITH_NCURSES @@ -71,6 +82,10 @@ snice_SOURCES = skill.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils dist_man_MANS += \ skill.1 \ snice.1 +else + EXTRA_DIST += \ + skill.1 \ + snice.1 endif free_SOURCES = free.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c @@ -88,15 +103,14 @@ if EXAMPLE_FILES sysconf_DATA = sysctl.conf endif -EXTRA_DIST = \ - autogen.sh \ - contrib \ - COPYING.LIB \ - Documentation/CodingStyle \ - Documentation/TODO \ - $(sysconf_DATA) - procpsngdir = $(docdir) dist_procpsng_DATA = \ Documentation/BUGS \ Documentation/FAQ + +BUILT_SOURCES = $(top_srcdir)/.version +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version +