summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2005-11-29 13:32:13 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2005-11-29 13:32:13 +0000
commite7c603844d1a3af80f2d2aaac3c9c8e3674bccfe (patch)
treefe346bf498779fcb891cfa15b2cc86777e85d03c
parent6c317b329562fe898737fe3c7b516922e2f075f4 (diff)
downloadcanutils-e7c603844d1a3af80f2d2aaac3c9c8e3674bccfe.tar.gz
* code restructured
git-svn-id: https://iocaste.extern.pengutronix.de/svn/canutils/trunks/canutils-1.0-trunk@54 5fd5a299-6ef2-0310-aa18-8b01d7c39d8c
-rw-r--r--GNUmakefile.am23
-rw-r--r--INSTALL42
-rw-r--r--Makefile.am37
-rw-r--r--NEWS0
-rw-r--r--README0
-rw-r--r--autogen.sh47
-rw-r--r--config/GNUmakefile.am (renamed from config/Makefile.am)2
-rw-r--r--configure.ac57
-rw-r--r--include/GNUmakefile.am6
-rw-r--r--include/Makefile.am6
-rw-r--r--man/GNUmakefile.am8
-rw-r--r--man/canconfig.8 (renamed from canconfig.8)0
-rw-r--r--man/candump.8 (renamed from candump.8)0
-rw-r--r--man/canecho.8 (renamed from canecho.8)0
-rw-r--r--man/cansend.8 (renamed from cansend.8)0
-rw-r--r--src/GNUmakefile.am15
-rw-r--r--src/canconfig.c (renamed from canconfig.c)0
-rw-r--r--src/candump.c (renamed from candump.c)0
-rw-r--r--src/canecho.c (renamed from canecho.c)0
-rw-r--r--src/cansend.c (renamed from cansend.c)0
-rw-r--r--src/cansequence.c (renamed from cansequence.c)0
21 files changed, 141 insertions, 102 deletions
diff --git a/GNUmakefile.am b/GNUmakefile.am
new file mode 100644
index 0000000..30a7a20
--- /dev/null
+++ b/GNUmakefile.am
@@ -0,0 +1,23 @@
+SUBDIRS = include config src
+
+EXTRA_DIST = \
+ autogen.sh \
+ config/m4/.secret-world-domination-project
+
+MAINTAINERCLEANFILES = \
+ configure \
+ GNUmakefile.in \
+ aclocal.m4 \
+ config/autoconf/compile \
+ config/autoconf/config.guess \
+ config/autoconf/config.sub \
+ config/autoconf/depcomp \
+ config/autoconf/install-sh \
+ config/autoconf/ltmain.sh \
+ config/autoconf/mdate-sh \
+ config/autoconf/missing \
+ config/autoconf/texinfo.tex \
+ config/m4/libtool.m4 \
+ config/m4/ltoptions.m4 \
+ config/m4/ltsugar.m4 \
+ config/m4/ltversion.m4
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index b8e3542..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,42 +0,0 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
-
- This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
-
-canutils Installation
-=====================
-
-To install canutils the usual autotools triple can be used:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' takes awhile. While running, it prints some
- messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
-
- 4. Type `make install' to install the programs and any data files and
- documentation.
-
- 5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-For further options of the configure script please have a look at the
-output of 'configure --help' or read the autotools manual.
-
-Optional Features
-=================
-
-canutils have no optional features at the moment.
-
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index ced7bc3..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,37 +0,0 @@
-bin_PROGRAMS = candump canecho cansend cansequence
-sbin_PROGRAMS = canconfig
-
-SUBDIRS = include config
-
-AM_CPPFLAGS = \
- -I$(top_srcdir)/include
- -I$(top_builddir)/include
-
-candump_SOURCES = candump.c
-canecho_SOURCES = canecho.c
-cansend_SOURCES = cansend.c
-canconfig_SOURCES = canconfig.c
-cansequence_SOURCES = cansequence.c
-
-EXTRA_DIST = \
- autogen.sh \
- config/m4/.secret-world-domination-project \
- \
- canconfig.8 \
- candump.8 \
- canecho.8 \
- cansend.8
-
-man_MANS = canconfig.8 candump.8 canecho.8 cansend.8
-
-MAINTAINERCLEANFILES = \
- configure \
- Makefile.in \
- aclocal.m4 \
- config/autoconf/depcomp \
- config/autoconf/missing \
- config/autoconf/config.guess \
- config/autoconf/config.sub \
- config/autoconf/ltmain.sh \
- config/autoconf/install-sh
-
diff --git a/NEWS b/NEWS
deleted file mode 100644
index e69de29..0000000
--- a/NEWS
+++ /dev/null
diff --git a/README b/README
deleted file mode 100644
index e69de29..0000000
--- a/README
+++ /dev/null
diff --git a/autogen.sh b/autogen.sh
index 3bcd1a7..76a7de0 100644
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,14 +1,27 @@
#!/bin/sh
+
+#
+# usage:
+#
+# banner <target name>
+#
+banner() {
+
+ echo
+ TG=`echo $1 | sed -e "s,/.*/,,g"`
+ LINE=`echo $TG |sed -e "s/./-/g"`
+ echo $LINE
+ echo $TG
+ echo $LINE
+ echo
+}
+
+
ACLOCAL=${ACLOCAL:=aclocal}
AUTOHEADER=${AUTOHEADER:=autoheader}
AUTOMAKE=${AUTOMAKE:=automake}
AUTOCONF=${AUTOCONF:=autoconf}
-echo use aclocal: $ACLOCAL
-echo use autoheader: $AUTOHEADER
-echo use automake: $AUTOMAKE
-echo use autoconf: $AUTOCONF
-
$ACLOCAL --version | \
awk -vPROG="aclocal" -vVERS=1.7\
'{if ($1 == PROG) {gsub ("-.*","",$4); if ($4 < VERS) print PROG" < version "VERS"\nThis may result in errors\n"}}'
@@ -17,9 +30,25 @@ $AUTOMAKE --version | \
awk -vPROG="automake" -vVERS=1.7\
'{if ($1 == PROG) {gsub ("-.*","",$4); if ($4 < VERS) print PROG" < version "VERS"\nThis may result in errors\n"}}'
-$ACLOCAL -I config/m4 && \
-libtoolize --force && \
-$AUTOHEADER && \
-$AUTOMAKE --gnu --add-missing -Wall && \
+
+banner "running libtoolize"
+libtoolize --force
+[ $? != 0 ] && exit
+
+banner "running aclocal"
+$ACLOCAL -I config/m4
+[ $? != 0 ] && exit
+
+banner "running autoheader"
+$AUTOHEADER
+[ $? != 0 ] && exit
+
+banner "running automake"
+$AUTOMAKE --gnu --add-missing -Wall
+[ $? != 0 ] && exit
+
+banner "running autoconf"
$AUTOCONF -Wall
+[ $? != 0 ] && exit
+banner "Finished"
diff --git a/config/Makefile.am b/config/GNUmakefile.am
index e373214..b77daeb 100644
--- a/config/Makefile.am
+++ b/config/GNUmakefile.am
@@ -4,4 +4,4 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = canutils.pc
MAINTAINERCLEANFILES = \
- Makefile.in \ No newline at end of file
+ GNUmakefile.in
diff --git a/configure.ac b/configure.ac
index 2658842..b1328e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,9 +2,9 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([canutils], [1.0.5], [socket-can@pengutronix.de])
+AC_INIT([canutils], [1.0.6], [socket-can@pengutronix.de])
AC_CONFIG_HEADERS([include/can_config.h])
-AC_CONFIG_SRCDIR([cansend.c])
+AC_CONFIG_SRCDIR([src/canconfig.c])
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_AUX_DIR([config/autoconf])
AC_CANONICAL_BUILD
@@ -12,16 +12,29 @@ AC_CANONICAL_HOST
CFLAGS="${CFLAGS} -Wall -O2 -g"
+#
# Checks for programs.
+#
AC_PROG_CC
-AC_PROG_INSTALL
+AM_MISSING_PROG(PERL, perl, $missing_dir)
+# libtool, old:
+AC_LIBTOOL_WIN32_DLL
+#AC_LIBTOOL_TAGS([])
AC_PROG_LIBTOOL
+# libtool, new:
+# LT_INIT(win32-dll)
AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
+
+#
# Checks for libraries.
+#
+
+#
# Checks for header files.
+#
AC_HEADER_STDC
AC_CHECK_HEADERS([ \
fcntl.h \
@@ -37,15 +50,45 @@ AC_CHECK_HEADERS([ \
sys/socket.h \
])
+#
# Checks for typedefs, structures, and compiler characteristics.
+#
+AC_C_CONST
+AC_C_INLINE
AC_TYPE_SIZE_T
+AC_HEADER_TIME
+
+#
# Checks for library functions.
+#
+
+
+#
+# Debugging
+#
+AC_MSG_CHECKING([whether to enable debugging])
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=no@:>@]),
+ [case "$enableval" in
+ y | yes) CONFIG_DEBUG=yes ;;
+ *) CONFIG_DEBUG=no ;;
+ esac],
+ [CONFIG_DEBUG=no])
+AC_MSG_RESULT([${CONFIG_DEBUG}])
+if test "${CONFIG_DEBUG}" = "yes"; then
+ CFLAGS="${CFLAGS} -Werror -g -O1"
+ AC_DEFINE(DEBUG, 1, [debugging])
+else
+ CFLAGS="${CFLAGS} -O2"
+fi
+
+
AC_CONFIG_FILES([ \
- Makefile \
+ GNUmakefile \
config/canutils.pc \
- config/Makefile \
- include/Makefile \
+ config/GNUmakefile \
+ include/GNUmakefile \
+ src/GNUmakefile
])
-
AC_OUTPUT
diff --git a/include/GNUmakefile.am b/include/GNUmakefile.am
new file mode 100644
index 0000000..e398444
--- /dev/null
+++ b/include/GNUmakefile.am
@@ -0,0 +1,6 @@
+nobase_include_HEADERS = socket-can/can.h
+
+MAINTAINERCLEANFILES = \
+ can_config.h.in \
+ GNUmakefile.in
+
diff --git a/include/Makefile.am b/include/Makefile.am
deleted file mode 100644
index 14df547..0000000
--- a/include/Makefile.am
+++ /dev/null
@@ -1,6 +0,0 @@
-nobase_include_HEADERS = socket-can/can.h
-
-MAINTAINERCLEANFILES= \
- can_config.h.in \
- Makefile.in
-
diff --git a/man/GNUmakefile.am b/man/GNUmakefile.am
new file mode 100644
index 0000000..7fd6fb2
--- /dev/null
+++ b/man/GNUmakefile.am
@@ -0,0 +1,8 @@
+man_MANS = \
+ canconfig.8 \
+ candump.8 \
+ canecho.8 \
+ cansend.8
+
+MAINTAINERCLEANFILES = \
+ GNUmakefile.in
diff --git a/canconfig.8 b/man/canconfig.8
index c02247a..c02247a 100644
--- a/canconfig.8
+++ b/man/canconfig.8
diff --git a/candump.8 b/man/candump.8
index cd11f89..cd11f89 100644
--- a/candump.8
+++ b/man/candump.8
diff --git a/canecho.8 b/man/canecho.8
index f453ac6..f453ac6 100644
--- a/canecho.8
+++ b/man/canecho.8
diff --git a/cansend.8 b/man/cansend.8
index 66f96bd..66f96bd 100644
--- a/cansend.8
+++ b/man/cansend.8
diff --git a/src/GNUmakefile.am b/src/GNUmakefile.am
new file mode 100644
index 0000000..195532c
--- /dev/null
+++ b/src/GNUmakefile.am
@@ -0,0 +1,15 @@
+bin_PROGRAMS = \
+ candump \
+ canecho \
+ cansend \
+ cansequence
+
+sbin_PROGRAMS = \
+ canconfig
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include
+ -I$(top_builddir)/include
+
+MAINTAINERCLEANFILES = \
+ GNUmakefile.in
diff --git a/canconfig.c b/src/canconfig.c
index 9207fe5..9207fe5 100644
--- a/canconfig.c
+++ b/src/canconfig.c
diff --git a/candump.c b/src/candump.c
index bf1514a..bf1514a 100644
--- a/candump.c
+++ b/src/candump.c
diff --git a/canecho.c b/src/canecho.c
index a80b908..a80b908 100644
--- a/canecho.c
+++ b/src/canecho.c
diff --git a/cansend.c b/src/cansend.c
index 80721c4..80721c4 100644
--- a/cansend.c
+++ b/src/cansend.c
diff --git a/cansequence.c b/src/cansequence.c
index e569b1b..e569b1b 100644
--- a/cansequence.c
+++ b/src/cansequence.c