From 90e0c0037e29beff2c78af63586c66bff1ce42cf Mon Sep 17 00:00:00 2001 From: Lekensteyn Date: Sat, 2 Jun 2012 22:12:23 +0200 Subject: [PATCH] autofoo cleanup, put version detection in configure.ac - Autogenerated files do not belong to the repository, remove those files. - The version is also determined when generating the configure file, so remove the version.sh file as well. - Remove ACLOCAL_AMFLAGS and the related entry in configure.ac to get rid of configuration errors. - Do not create NEWS or INSTALL by using a lower strictness. - Ignore autogenerated autojunk. --- Makefile.am | 1 - configure.ac | 9 +++++---- version.sh | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) delete mode 100755 version.sh diff --git a/Makefile.am b/Makefile.am index 6ccf77b6..e1d5774b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,3 @@ -ACLOCAL_AMFLAGS=-I m4 SUBDIRS=lib src EXTRA_DIST=server.html docs: diff --git a/configure.ac b/configure.ac index 2c2cd76f..4837fbcc 100644 --- a/configure.ac +++ b/configure.ac @@ -2,11 +2,12 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.60]) -m4_include([version.m4]) -AC_INIT(MistServer, VERSION_NUMBER, contact@ddvtech.com) +AC_INIT([MistServer], + m4_esyscmd([git describe --tags | tr -d '\n']), + [contact@ddvtech.com]) AC_CONFIG_SRCDIR([src/buffer.cpp]) -AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE +# foreign: no need for NEWS or INSTALL files +AM_INIT_AUTOMAKE([foreign]) LT_INIT # Checks for programs. diff --git a/version.sh b/version.sh deleted file mode 100755 index 671da00b..00000000 --- a/version.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -if git describe --tags > version.tmp; then - echo "m4_define([VERSION_NUMBER], [`tr -d '\n' < version.tmp`])" > version.m4 -fi -rm version.tmp