moved unber and enber into asn1-tools
diff --git a/.gitignore b/.gitignore
index e8d6665..09275af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,8 +34,10 @@
# /asn1c/
/asn1c/asn1c
-/asn1c/unber
-/asn1c/enber
+
+# /asn1c-tools
+/asn1-tools/enber
+/asn1-tools/unber
# /skeletons
/skeletons/check-*
diff --git a/Makefile.am b/Makefile.am
index 4389e53..1f1483e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,8 +8,8 @@
libasn1common libasn1parser \
libasn1fix libasn1print \
libasn1compiler \
- asn1c skeletons tests \
- examples doc
+ asn1-tools asn1c skeletons \
+ tests examples doc
docsdir = $(datadir)/doc/asn1c
diff --git a/asn1-tools/Makefile.am b/asn1-tools/Makefile.am
new file mode 100644
index 0000000..5df2978
--- /dev/null
+++ b/asn1-tools/Makefile.am
@@ -0,0 +1,11 @@
+@CODE_COVERAGE_RULES@
+
+SUBDIRS=unber enber
+
+AM_CFLAGS = @ADD_CFLAGS@
+AM_CPPFLAGS = -I${top_srcdir}/skeletons
+
+dist_check_SCRIPTS = check-xxber.sh
+TESTS_ENVIRONMENT= builddir=${builddir}
+TESTS = $(dist_check_SCRIPTS)
+CLEANFILES = .check-xxber.*.tmp
diff --git a/asn1-tools/README b/asn1-tools/README
new file mode 100644
index 0000000..e0cd8f0
--- /dev/null
+++ b/asn1-tools/README
@@ -0,0 +1,2 @@
+unber - The ASN.1 BER Decoder
+enber - Reverse unber(1) output back into BER
diff --git a/asn1c/check-xxber.sh b/asn1-tools/check-xxber.sh
similarity index 88%
rename from asn1c/check-xxber.sh
rename to asn1-tools/check-xxber.sh
index e099707..09f1b26 100755
--- a/asn1c/check-xxber.sh
+++ b/asn1-tools/check-xxber.sh
@@ -3,6 +3,10 @@
ORIG="./.check-xxber.orig.$$.tmp"
TEST="./.check-xxber.test.$$.tmp"
+builddir=${builddir:-.}
+ENBER=${builddir}/enber/enber
+UNBER=${builddir}/unber/unber
+
# Test diff(1) capabilities
diff -a . . 2>/dev/null && diffArgs="-a" # Assume text files
diff -u . . 2>/dev/null && diffArgs="$diffArgs -u" # Unified diff output
@@ -23,7 +27,7 @@
</I O="32" T="[UNIVERSAL 0]" TL="2" L="4">
EOM
-./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1
+${ENBER} $ORIG | ${UNBER} -p -i 0 - > $TEST 2>&1
diff $diffArgs "$ORIG" "$TEST" >/dev/null 2>&1
diffExitCode=$?
@@ -36,7 +40,7 @@
echo '</I O="34" T="[UNIVERSAL 0]" TL="2" L="36">' >> $ORIG
# Try trancoding again
-./enber $ORIG | ./unber -p -i 0 - > $TEST 2>&1
+${ENBER} $ORIG | ${UNBER} -p -i 0 - > $TEST 2>&1
diff $diffArgs "$ORIG" "$TEST"
diffExitCode=$?
diff --git a/asn1-tools/enber/Makefile.am b/asn1-tools/enber/Makefile.am
new file mode 100644
index 0000000..d79cb73
--- /dev/null
+++ b/asn1-tools/enber/Makefile.am
@@ -0,0 +1,9 @@
+@CODE_COVERAGE_RULES@
+
+AM_CFLAGS = @ADD_CFLAGS@
+AM_CPPFLAGS = \
+ -I${top_srcdir}/libasn1common \
+ -I${top_srcdir}/libasn1parser \
+ -I${top_srcdir}/skeletons
+
+bin_PROGRAMS = enber
diff --git a/asn1c/enber.c b/asn1-tools/enber/enber.c
similarity index 99%
rename from asn1c/enber.c
rename to asn1-tools/enber/enber.c
index 3aeab6c..104e3ad 100644
--- a/asn1c/enber.c
+++ b/asn1-tools/enber/enber.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 2004, 2005 Lev Walkin <vlm@lionet.info>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -22,9 +22,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
*/
-#include "sys-common.h"
+#include "asn1_common.h"
#include <asn1parser.h> /* For static string tables */
diff --git a/asn1-tools/unber/Makefile.am b/asn1-tools/unber/Makefile.am
new file mode 100644
index 0000000..938bea1
--- /dev/null
+++ b/asn1-tools/unber/Makefile.am
@@ -0,0 +1,11 @@
+@CODE_COVERAGE_RULES@
+
+AM_CFLAGS = @ADD_CFLAGS@
+AM_CPPFLAGS = \
+ -I${top_srcdir}/libasn1common \
+ -I${top_srcdir}/libasn1parser \
+ -I${top_srcdir}/skeletons
+
+unber_LDADD = $(top_builddir)/libasn1common/libasn1common.la
+
+bin_PROGRAMS = unber
diff --git a/asn1c/unber.c b/asn1-tools/unber/unber.c
similarity index 99%
rename from asn1c/unber.c
rename to asn1-tools/unber/unber.c
index a344921..c707c98 100644
--- a/asn1c/unber.c
+++ b/asn1-tools/unber/unber.c
@@ -1,4 +1,4 @@
-/*-
+/*
* Copyright (c) 2004, 2005, 2006 Lev Walkin <vlm@lionet.info>.
* All rights reserved.
*
@@ -23,9 +23,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
*/
-#include "sys-common.h"
+#include "asn1_common.h"
#define ASN_DISABLE_PER_SUPPORT 1
#define ASN_DISABLE_OER_SUPPORT 1
diff --git a/asn1c/Makefile.am b/asn1c/Makefile.am
index 40f000f..abd036e 100644
--- a/asn1c/Makefile.am
+++ b/asn1c/Makefile.am
@@ -17,14 +17,4 @@
$(top_builddir)/libasn1fix/libasn1fix.la \
$(top_builddir)/libasn1compiler/libasn1compiler.la
-unber_LDADD = \
- $(top_builddir)/libasn1common/libasn1common.la
-
-bin_PROGRAMS = asn1c unber enber
-
-noinst_HEADERS = sys-common.h
-
-dist_check_SCRIPTS = check-xxber.sh
-TESTS_ENVIRONMENT= top_srcdir=${top_srcdir}
-TESTS = $(dist_check_SCRIPTS)
-CLEANFILES = .check-xxber.*.tmp
+bin_PROGRAMS = asn1c
diff --git a/asn1c/README b/asn1c/README
index 47541d9..4f719ac 100644
--- a/asn1c/README
+++ b/asn1c/README
@@ -1,3 +1 @@
asn1c - The ASN.1 Compiler
-unber - The ASN.1 BER Decoder
-enber - Reverse unber(1) output back into BER
diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c
index b67f9e7..cde798f 100644
--- a/asn1c/asn1c.c
+++ b/asn1c/asn1c.c
@@ -23,13 +23,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
*/
/*
* This is the program that connects the libasn1* libraries together.
* It uses them in turn to parse, fix and then compile or print the ASN.1 tree.
*/
-#include "sys-common.h"
+#include "asn1_common.h"
#undef COPYRIGHT
#define COPYRIGHT "Copyright (c) 2003-2017 Lev Walkin <vlm@lionet.info> and contributors.\n"
diff --git a/configure.ac b/configure.ac
index b0e5ffd..0dbdf9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -292,6 +292,9 @@
tests/tests-randomized/Makefile \
tests/tests-c-compiler/Makefile \
tests/tests-skeletons/Makefile \
+asn1-tools/enber/Makefile \
+asn1-tools/unber/Makefile \
+asn1-tools/Makefile \
libasn1compiler/Makefile \
libasn1common/Makefile \
libasn1parser/Makefile \
diff --git a/libasn1common/Makefile.am b/libasn1common/Makefile.am
index 78f05fd..2301712 100644
--- a/libasn1common/Makefile.am
+++ b/libasn1common/Makefile.am
@@ -5,7 +5,7 @@
noinst_LTLIBRARIES = libasn1common.la
libasn1common_la_SOURCES = \
- asn1_ref.c asn1_ref.h \
+ asn1_common.h asn1_ref.c asn1_ref.h \
asn1_buffer.c asn1_buffer.h \
asn1_namespace.c asn1_namespace.h \
genhash.c genhash.h
diff --git a/asn1c/sys-common.h b/libasn1common/asn1_common.h
similarity index 100%
rename from asn1c/sys-common.h
rename to libasn1common/asn1_common.h