diff --git a/ChangeLog b/ChangeLog index 7905dc621..70a6e7caf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,5 @@ -???: +0.9.26: 2014-Sep-11 * Updated asn1c-usage.pdf. * Made -fskeletons-copy a default option; removed cmdline option. * Made -fnative-types a default option; removed cmdline option. diff --git a/Makefile.am b/Makefile.am index 58019e8b5..c190f1516 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,12 +4,12 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ libasn1parser libasn1fix \ libasn1print libasn1compiler \ - skeletons examples tests \ + skeletons examples \ doc asn1c docsdir = $(datadir)/doc/asn1c docs_DATA = README FAQ COPYING ChangeLog BUGS TODO -EXTRA_DIST = asn1c.spec.in FAQ BUGS MANIFEST +EXTRA_DIST = asn1c.spec.in FAQ BUGS MANIFEST tests/ CLEANFILES = asn1c.spec diff --git a/Makefile.in b/Makefile.in index 0fafb6a25..2e4f57377 100644 --- a/Makefile.in +++ b/Makefile.in @@ -171,6 +171,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -253,12 +254,12 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ libasn1parser libasn1fix \ libasn1print libasn1compiler \ - skeletons examples tests \ + skeletons examples \ doc asn1c docsdir = $(datadir)/doc/asn1c docs_DATA = README FAQ COPYING ChangeLog BUGS TODO -EXTRA_DIST = asn1c.spec.in FAQ BUGS MANIFEST +EXTRA_DIST = asn1c.spec.in FAQ BUGS MANIFEST tests/ CLEANFILES = asn1c.spec all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -266,7 +267,7 @@ all: config.h .SUFFIXES: am--refresh: @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -293,9 +294,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): @@ -308,7 +309,7 @@ config.h: stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ diff --git a/aclocal.m4 b/aclocal.m4 index ff520dbb1..d8867c36a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -608,6 +608,46 @@ if test "$LEX" = :; then LEX=${am_missing_run}flex fi]) +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless `enable' is passed literally. +# For symmetry, `disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], +[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. diff --git a/asn1c/Makefile.am b/asn1c/Makefile.am index 01258986f..a369de3f2 100644 --- a/asn1c/Makefile.am +++ b/asn1c/Makefile.am @@ -23,5 +23,6 @@ noinst_HEADERS = sys-common.h dist_man1_MANS = asn1c.1 unber.1 enber.1 dist_check_SCRIPTS = check-xxber.sh check-parsing.sh +TESTS_ENVIRONMENT= top_srcdir=${top_srcdir} TESTS = $(dist_check_SCRIPTS) CLEANFILES = .check-xxber.*.tmp .check-parsing.*.tmp diff --git a/asn1c/Makefile.in b/asn1c/Makefile.in index 13cd0815f..2fef6057c 100644 --- a/asn1c/Makefile.in +++ b/asn1c/Makefile.in @@ -189,6 +189,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -286,13 +287,14 @@ asn1c_LDADD = \ noinst_HEADERS = sys-common.h dist_man1_MANS = asn1c.1 unber.1 enber.1 dist_check_SCRIPTS = check-xxber.sh check-parsing.sh +TESTS_ENVIRONMENT = top_srcdir=${top_srcdir} TESTS = $(dist_check_SCRIPTS) CLEANFILES = .check-xxber.*.tmp .check-parsing.*.tmp all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -317,9 +319,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) diff --git a/asn1c/check-parsing.sh b/asn1c/check-parsing.sh index ebbf399e3..7d81172bf 100755 --- a/asn1c/check-parsing.sh +++ b/asn1c/check-parsing.sh @@ -1,25 +1,43 @@ #!/bin/sh -tmpfile=".check-parsing.$$.tmp" - # 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 ec=0 -for ref in ../tests/*.asn1.-*; do +set -o pipefail +set -e + +PROCESSING="" +print_status() { + echo "Error while processing $PROCESSING" +} + +trap print_status ERR + +if [ "x${top_srcdir}" = "x" ]; then + top_srcdir=".." +fi + +for ref in ${top_srcdir}/tests/*.asn1.-*; do + # Figure out the initial source file used to generate this output. src=`echo "$ref" | sed -e 's/\.-[-a-zA-Z0-9=]*$//'` + # Figure out compiler flags used to create the file. flags=`echo "$ref" | sed -e 's/.*\.-//'` echo "Checking $src against $ref" - ./asn1c -S../skeletons "-$flags" "$src" > "$tmpfile" || ec=$? + template=.tmp.check-parsing.$$ + oldversion=${template}.old + newversion=${template}.new + PROCESSING="$ref (from $src)" + cat "$ref" | LANG=C sed -e 's/^found in .*/found in .../' > $oldversion + (./asn1c -S ${top_srcdir}/skeletons "-$flags" "$src" | LANG=C sed -e 's/^found in .*/found in .../' > "$newversion") || ec=$? if [ $? = 0 ]; then - diff $diffArgs "$ref" "$tmpfile" || ec=$? + diff $diffArgs "$oldversion" "$newversion" || ec=$? fi - if [ "$1" != "regenerate" ]; then - rm -f "$tmpfile" - else - mv "$tmpfile" "$ref" + rm -f $oldversion $newversion + if [ "$1" = "regenerate" ]; then + ./asn1c -S ${top_srcdir}/skeletons "-$flags" "$src" > "$ref" fi done diff --git a/asn1c/tests/Makefile.am b/asn1c/tests/Makefile.am index 5f0570203..f780a4a97 100644 --- a/asn1c/tests/Makefile.am +++ b/asn1c/tests/Makefile.am @@ -1,15 +1,15 @@ dist_check_SCRIPTS = check-assembly.sh -TESTS_ENVIRONMENT= CC="${CC}" CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS} -Wno-error=unused-variable" CXXFLAGS="${CXXFLAGS}" ./check-assembly.sh +TESTS_ENVIRONMENT= CC="${CC}" CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS} -Wno-error=unused-variable" CXXFLAGS="${CXXFLAGS}" srcdir=${srcdir} top_srcdir=${top_srcdir} top_builddir=${top_builddir} ${srcdir}/check-assembly.sh -TESTS = check-*.c +TESTS = ${srcdir}/check-src/check-*.c if TEST_64BIT -TESTS += check64-*.c +TESTS += ${srcdir}/check-src/check64-*.c endif EXTRA_DIST = \ - check-*.c* \ + check-src/ \ data-62 \ data-70 \ data-119 \ diff --git a/asn1c/tests/Makefile.in b/asn1c/tests/Makefile.in index 7204cc822..a191aa882 100644 --- a/asn1c/tests/Makefile.in +++ b/asn1c/tests/Makefile.in @@ -33,7 +33,7 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@TEST_64BIT_TRUE@am__append_1 = check64-*.c +@TEST_64BIT_TRUE@am__append_1 = ${srcdir}/check-src/check64-*.c subdir = asn1c/tests DIST_COMMON = README $(dist_check_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -95,6 +95,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -174,10 +175,10 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_check_SCRIPTS = check-assembly.sh -TESTS_ENVIRONMENT = CC="${CC}" CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS} -Wno-error=unused-variable" CXXFLAGS="${CXXFLAGS}" ./check-assembly.sh -TESTS = check-*.c $(am__append_1) +TESTS_ENVIRONMENT = CC="${CC}" CFLAGS="${TESTSUITE_CFLAGS} ${CFLAGS} -Wno-error=unused-variable" CXXFLAGS="${CXXFLAGS}" srcdir=${srcdir} top_srcdir=${top_srcdir} top_builddir=${top_builddir} ${srcdir}/check-assembly.sh +TESTS = ${srcdir}/check-src/check-*.c $(am__append_1) EXTRA_DIST = \ - check-*.c* \ + check-src/ \ data-62 \ data-70 \ data-119 \ @@ -186,7 +187,7 @@ EXTRA_DIST = \ all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -211,9 +212,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/asn1c/tests/check-assembly.sh b/asn1c/tests/check-assembly.sh index 5858f5bf5..bdcc7d9f6 100755 --- a/asn1c/tests/check-assembly.sh +++ b/asn1c/tests/check-assembly.sh @@ -10,11 +10,15 @@ if [ "x$1" = "x" ]; then exit fi +set -o pipefail +set -e + # Compute the .asn1 spec name by the given file name. -source=`echo "$1" | sed -e 's/.*\///'` -testno=`echo "$source" | cut -f2 -d'-' | cut -f1 -d'.'` +source_full=$1 +source_short=`echo "$source_full" | sed -e 's/.*\///'` +testno=`echo "$source_short" | cut -f2 -d'-' | cut -f1 -d'.'` -args=`echo "$source" | sed -e 's/\.c[c]*$//'` +args=`echo "$source_short" | sed -e 's/\.c[c]*$//'` testdir=test-${args} OFS=$IFS @@ -24,16 +28,15 @@ shift IFS=$OFS AFLAGS="$@" -touch ${testdir}-FAILED # Create this file to ease post mortem analysis +# Assume the test fails. Will be removed when it passes well. +touch ${testdir}-FAILED -if [ ! -d $testdir ]; then - mkdir $testdir || exit $? -fi -cd $testdir || exit $? -rm -f ./$source 2>/dev/null -ln -fns ../$source || exit $? +mkdir -p $testdir +cd $testdir +rm -f $source_short +ln -fns ../$source_full -asn_module=`echo ../../../tests/${testno}-*.asn1` +asn_module=`echo ../${top_srcdir}/tests/${testno}-*.asn1` # Create a Makefile for the project. cat > Makefile < Makefile < +#ifndef SRCDIR +#define SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define SRCDIR_S STRINGIFY_MACRO(SRCDIR) +#endif + enum expectation { EXP_OK, /* Encoding/decoding must succeed */ EXP_CXER_EXACT, /* Encoding/decoding using CXER must be exact */ @@ -311,7 +319,7 @@ process(const char *fname) { fprintf(stderr, "\nProcessing file [../%s]\n", fname); - snprintf((char *)fbuf, sizeof(fbuf), "../data-119/%s", fname); + snprintf((char *)fbuf, sizeof(fbuf), SRCDIR_S "/data-119/%s", fname); fp = fopen((char *)fbuf, "r"); assert(fp); @@ -341,7 +349,7 @@ main() { return 0; } - dir = opendir("../data-119"); + dir = opendir(SRCDIR_S "/data-119"); assert(dir); /* diff --git a/asn1c/tests/check-119.-gen-PER.c b/asn1c/tests/check-src/check-119.-gen-PER.c similarity index 96% rename from asn1c/tests/check-119.-gen-PER.c rename to asn1c/tests/check-src/check-119.-gen-PER.c index adcc6d970..a1f2f805a 100644 --- a/asn1c/tests/check-119.-gen-PER.c +++ b/asn1c/tests/check-src/check-119.-gen-PER.c @@ -17,6 +17,14 @@ #include +#ifndef SRCDIR +#define SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define SRCDIR_S STRINGIFY_MACRO(SRCDIR) +#endif + enum expectation { EXP_OK, /* Encoding/decoding must succeed */ EXP_CXER_EXACT, /* Encoding/decoding using CXER must be exact */ @@ -313,7 +321,7 @@ process(const char *fname) { fprintf(stderr, "\nProcessing file [../%s]\n", fname); - snprintf((char *)fbuf, sizeof(fbuf), "../data-119/%s", fname); + snprintf((char *)fbuf, sizeof(fbuf), SRCDIR_S "/data-119/%s", fname); fp = fopen((char *)fbuf, "r"); assert(fp); @@ -343,7 +351,7 @@ main() { return 0; } - dir = opendir("../data-119"); + dir = opendir(SRCDIR_S "/data-119"); assert(dir); /* diff --git a/asn1c/tests/check-126.-gen-PER.c b/asn1c/tests/check-src/check-126.-gen-PER.c similarity index 95% rename from asn1c/tests/check-126.-gen-PER.c rename to asn1c/tests/check-src/check-126.-gen-PER.c index 81ebc0e38..595a1dbf1 100644 --- a/asn1c/tests/check-126.-gen-PER.c +++ b/asn1c/tests/check-src/check-126.-gen-PER.c @@ -16,6 +16,14 @@ #include +#ifndef SRCDIR +#define SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define SRCDIR_S STRINGIFY_MACRO(SRCDIR) +#endif + static unsigned char buf[4096]; static int buf_offset; @@ -229,14 +237,14 @@ xer_encoding_equal(void *obufp, size_t osize, void *nbufp, size_t nsize) { static void compare_with_data_out(const char *fname, void *datap, size_t size) { char *data = datap; - char outName[256]; + char outName[sizeof(SRCDIR_S) + 256]; unsigned char fbuf[1024]; size_t rd; FILE *f; char lastChar; int mustfail, compare; - sprintf(outName, "../data-126/%s", fname); + sprintf(outName, SRCDIR_S "/data-126/%s", fname); strcpy(outName + strlen(outName) - 3, ".out"); fprintf(stderr, "Comparing PER output with [%s]\n", outName); @@ -304,7 +312,7 @@ process_XER_data(const char *fname, unsigned char *fbuf, size_t size) { */ static int process(const char *fname) { - unsigned char fbuf[4096]; + unsigned char fbuf[sizeof(SRCDIR_S) + 4096]; char *ext = strrchr(fname, '.'); int rd; FILE *fp; @@ -314,7 +322,7 @@ process(const char *fname) { fprintf(stderr, "\nProcessing file [../%s]\n", fname); - snprintf((char *)fbuf, sizeof(fbuf), "../data-126/%s", fname); + snprintf((char *)fbuf, sizeof(fbuf), SRCDIR_S "/data-126/%s", fname); fp = fopen((char *)fbuf, "r"); assert(fp); @@ -344,7 +352,7 @@ main() { return 0; } - dir = opendir("../data-126"); + dir = opendir(SRCDIR_S "/data-126"); assert(dir); /* diff --git a/asn1c/tests/check-127.-gen-PER.c b/asn1c/tests/check-src/check-127.-gen-PER.c similarity index 100% rename from asn1c/tests/check-127.-gen-PER.c rename to asn1c/tests/check-src/check-127.-gen-PER.c diff --git a/asn1c/tests/check-131.-gen-PER.c b/asn1c/tests/check-src/check-131.-gen-PER.c similarity index 100% rename from asn1c/tests/check-131.-gen-PER.c rename to asn1c/tests/check-src/check-131.-gen-PER.c diff --git a/asn1c/tests/check-132.-gen-PER.c b/asn1c/tests/check-src/check-132.-gen-PER.c similarity index 100% rename from asn1c/tests/check-132.-gen-PER.c rename to asn1c/tests/check-src/check-132.-gen-PER.c diff --git a/asn1c/tests/check-133.-gen-PER.c b/asn1c/tests/check-src/check-133.-gen-PER.c similarity index 100% rename from asn1c/tests/check-133.-gen-PER.c rename to asn1c/tests/check-src/check-133.-gen-PER.c diff --git a/asn1c/tests/check-19.c b/asn1c/tests/check-src/check-19.c similarity index 100% rename from asn1c/tests/check-19.c rename to asn1c/tests/check-src/check-19.c diff --git a/asn1c/tests/check-22.-fwide-types.c b/asn1c/tests/check-src/check-22.-fwide-types.c similarity index 100% rename from asn1c/tests/check-22.-fwide-types.c rename to asn1c/tests/check-src/check-22.-fwide-types.c diff --git a/asn1c/tests/check-24.-fwide-types.c b/asn1c/tests/check-src/check-24.-fwide-types.c similarity index 100% rename from asn1c/tests/check-24.-fwide-types.c rename to asn1c/tests/check-src/check-24.-fwide-types.c diff --git a/asn1c/tests/check-25.-fwide-types.c b/asn1c/tests/check-src/check-25.-fwide-types.c similarity index 100% rename from asn1c/tests/check-25.-fwide-types.c rename to asn1c/tests/check-src/check-25.-fwide-types.c diff --git a/asn1c/tests/check-30.-fwide-types.c b/asn1c/tests/check-src/check-30.-fwide-types.c similarity index 100% rename from asn1c/tests/check-30.-fwide-types.c rename to asn1c/tests/check-src/check-30.-fwide-types.c diff --git a/asn1c/tests/check-31.-fwide-types.c b/asn1c/tests/check-src/check-31.-fwide-types.c similarity index 100% rename from asn1c/tests/check-31.-fwide-types.c rename to asn1c/tests/check-src/check-31.-fwide-types.c diff --git a/asn1c/tests/check-32.c b/asn1c/tests/check-src/check-32.c similarity index 100% rename from asn1c/tests/check-32.c rename to asn1c/tests/check-src/check-32.c diff --git a/asn1c/tests/check-33.c b/asn1c/tests/check-src/check-33.c similarity index 100% rename from asn1c/tests/check-33.c rename to asn1c/tests/check-src/check-33.c diff --git a/asn1c/tests/check-35.c b/asn1c/tests/check-src/check-35.c similarity index 100% rename from asn1c/tests/check-35.c rename to asn1c/tests/check-src/check-35.c diff --git a/asn1c/tests/check-39.c b/asn1c/tests/check-src/check-39.c similarity index 100% rename from asn1c/tests/check-39.c rename to asn1c/tests/check-src/check-39.c diff --git a/asn1c/tests/check-41.-fwide-types.c b/asn1c/tests/check-src/check-41.-fwide-types.c similarity index 100% rename from asn1c/tests/check-41.-fwide-types.c rename to asn1c/tests/check-src/check-41.-fwide-types.c diff --git a/asn1c/tests/check-41.c b/asn1c/tests/check-src/check-41.c similarity index 100% rename from asn1c/tests/check-41.c rename to asn1c/tests/check-src/check-41.c diff --git a/asn1c/tests/check-42.c b/asn1c/tests/check-src/check-42.c similarity index 100% rename from asn1c/tests/check-42.c rename to asn1c/tests/check-src/check-42.c diff --git a/asn1c/tests/check-43.c b/asn1c/tests/check-src/check-43.c similarity index 100% rename from asn1c/tests/check-43.c rename to asn1c/tests/check-src/check-43.c diff --git a/asn1c/tests/check-44.c b/asn1c/tests/check-src/check-44.c similarity index 100% rename from asn1c/tests/check-44.c rename to asn1c/tests/check-src/check-44.c diff --git a/asn1c/tests/check-46.c b/asn1c/tests/check-src/check-46.c similarity index 100% rename from asn1c/tests/check-46.c rename to asn1c/tests/check-src/check-46.c diff --git a/asn1c/tests/check-48.c b/asn1c/tests/check-src/check-48.c similarity index 100% rename from asn1c/tests/check-48.c rename to asn1c/tests/check-src/check-48.c diff --git a/asn1c/tests/check-50.c b/asn1c/tests/check-src/check-50.c similarity index 100% rename from asn1c/tests/check-50.c rename to asn1c/tests/check-src/check-50.c diff --git a/asn1c/tests/check-59.c b/asn1c/tests/check-src/check-59.c similarity index 100% rename from asn1c/tests/check-59.c rename to asn1c/tests/check-src/check-59.c diff --git a/asn1c/tests/check-60.c b/asn1c/tests/check-src/check-60.c similarity index 100% rename from asn1c/tests/check-60.c rename to asn1c/tests/check-src/check-60.c diff --git a/asn1c/tests/check-62.c b/asn1c/tests/check-src/check-62.c similarity index 92% rename from asn1c/tests/check-62.c rename to asn1c/tests/check-src/check-62.c index 27e135456..7c1864bc8 100644 --- a/asn1c/tests/check-62.c +++ b/asn1c/tests/check-src/check-62.c @@ -2,7 +2,7 @@ #include #include #include -#include /* for chdir(2) */ +#include /* for chdir(2), getcwd(3) */ #include #include #include @@ -10,6 +10,14 @@ #include +#ifndef SRCDIR +#define SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define SRCDIR_S STRINGIFY_MACRO(SRCDIR) +#endif + enum expectation { EXP_OK, /* Encoding/decoding must succeed */ EXP_BROKEN, /* Decoding must fail */ @@ -142,6 +150,7 @@ process_data(enum expectation expectation, unsigned char *fbuf, ssize_t size) { */ static int process(const char *fname) { + char prevdir[256]; unsigned char fbuf[4096]; char *ext = strrchr(fname, '.'); enum expectation expectation; @@ -165,10 +174,11 @@ process(const char *fname) { fprintf(stderr, "\nProcessing file [../%s]\n", fname); - ret = chdir("../data-62"); + getcwd(prevdir, sizeof(prevdir)); + ret = chdir(SRCDIR_S "/data-62"); assert(ret == 0); fp = fopen(fname, "r"); - ret = chdir("../test-check-62"); + ret = chdir(prevdir); assert(ret == 0); assert(fp); @@ -189,7 +199,7 @@ main() { int processed_files = 0; char *str; - dir = opendir("../data-62"); + dir = opendir(SRCDIR_S "/data-62"); assert(dir); str = getenv("DATA_62_FILE"); diff --git a/asn1c/tests/check-65.c b/asn1c/tests/check-src/check-65.c similarity index 100% rename from asn1c/tests/check-65.c rename to asn1c/tests/check-src/check-65.c diff --git a/asn1c/tests/check-70.-fwide-types.c b/asn1c/tests/check-src/check-70.-fwide-types.c similarity index 95% rename from asn1c/tests/check-70.-fwide-types.c rename to asn1c/tests/check-src/check-70.-fwide-types.c index 92db99c3a..3a42e99a7 100644 --- a/asn1c/tests/check-70.-fwide-types.c +++ b/asn1c/tests/check-src/check-70.-fwide-types.c @@ -8,7 +8,7 @@ #include #include #include -#include /* for chdir(2) */ +#include /* for chdir(2), getcwd(3) */ #include #include #include @@ -17,6 +17,14 @@ #include +#ifndef SRCDIR +#define SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define SRCDIR_S STRINGIFY_MACRO(SRCDIR) +#endif + enum expectation { EXP_OK, /* Encoding/decoding must succeed */ EXP_CXER_EXACT, /* Encoding/decoding using CXER must be exact */ @@ -250,6 +258,7 @@ process_XER_data(enum expectation expectation, unsigned char *fbuf, size_t size) */ static int process(const char *fname) { + char prevdir[256]; unsigned char fbuf[4096]; char *ext = strrchr(fname, '.'); enum expectation expectation; @@ -275,10 +284,11 @@ process(const char *fname) { fprintf(stderr, "\nProcessing file [../%s]\n", fname); - ret = chdir("../data-70"); + getcwd(prevdir, sizeof(prevdir)); + ret = chdir(SRCDIR_S "/data-70"); assert(ret == 0); fp = fopen(fname, "r"); - ret = chdir("../test-check-70.-fwide-types"); + ret = chdir(prevdir); assert(ret == 0); assert(fp); @@ -306,7 +316,7 @@ main() { return 0; } - dir = opendir("../data-70"); + dir = opendir(SRCDIR_S "/data-70"); assert(dir); /* diff --git a/asn1c/tests/check-70.c b/asn1c/tests/check-src/check-70.c similarity index 94% rename from asn1c/tests/check-70.c rename to asn1c/tests/check-src/check-70.c index 431a21a1c..d09f095ac 100644 --- a/asn1c/tests/check-70.c +++ b/asn1c/tests/check-src/check-70.c @@ -8,7 +8,7 @@ #include #include #include -#include /* for chdir(2) */ +#include /* for chdir(2), getcwd(3) */ #include #include #include /* for isspace(3) */ @@ -17,6 +17,14 @@ #include +#ifndef SRCDIR +#define SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define SRCDIR_S STRINGIFY_MACRO(SRCDIR) +#endif + enum expectation { EXP_OK, /* Encoding/decoding must succeed */ EXP_BROKEN, /* Decoding must fail */ @@ -226,6 +234,7 @@ process_XER_data(enum expectation expectation, unsigned char *fbuf, size_t size) */ static int process(const char *fname) { + char prevdir[256]; unsigned char fbuf[4096]; char *ext = strrchr(fname, '.'); enum expectation expectation; @@ -249,10 +258,11 @@ process(const char *fname) { fprintf(stderr, "\nProcessing file [../%s]\n", fname); - ret = chdir("../data-70"); + getcwd(prevdir, sizeof(prevdir)); + ret = chdir(SRCDIR_S "/data-70"); assert(ret == 0); fp = fopen(fname, "r"); - ret = chdir("../test-check-70"); + ret = chdir(prevdir); assert(ret == 0); assert(fp); @@ -278,7 +288,7 @@ main() { if(str && strncmp(str, "data-70-", 8) == 0) process(str); - dir = opendir("../data-70"); + dir = opendir(SRCDIR_S "/data-70"); assert(dir); /* diff --git a/asn1c/tests/check-72.-fcompound-names.c b/asn1c/tests/check-src/check-72.-fcompound-names.c similarity index 100% rename from asn1c/tests/check-72.-fcompound-names.c rename to asn1c/tests/check-src/check-72.-fcompound-names.c diff --git a/asn1c/tests/check-73.c b/asn1c/tests/check-src/check-73.c similarity index 100% rename from asn1c/tests/check-73.c rename to asn1c/tests/check-src/check-73.c diff --git a/asn1c/tests/check-92.-findirect-choice.c b/asn1c/tests/check-src/check-92.-findirect-choice.c similarity index 100% rename from asn1c/tests/check-92.-findirect-choice.c rename to asn1c/tests/check-src/check-92.-findirect-choice.c diff --git a/asn1c/tests/check-92.c b/asn1c/tests/check-src/check-92.c similarity index 100% rename from asn1c/tests/check-92.c rename to asn1c/tests/check-src/check-92.c diff --git a/asn1c/tests/check64-134.-gen-PER.c b/asn1c/tests/check-src/check64-134.-gen-PER.c similarity index 100% rename from asn1c/tests/check64-134.-gen-PER.c rename to asn1c/tests/check-src/check64-134.-gen-PER.c diff --git a/configure b/configure index 81070f3da..0c9136e47 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for asn1c 0.9.24. +# Generated by GNU Autoconf 2.69 for asn1c 0.9.26. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='asn1c' PACKAGE_TARNAME='asn1c' -PACKAGE_VERSION='0.9.24' -PACKAGE_STRING='asn1c 0.9.24' +PACKAGE_VERSION='0.9.26' +PACKAGE_STRING='asn1c 0.9.26' PACKAGE_BUGREPORT='vlm@lionet.info' PACKAGE_URL='' @@ -690,6 +690,9 @@ build_vendor build_cpu build LIBTOOL +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE am__untar am__tar AMTAR @@ -754,6 +757,7 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking +enable_maintainer_mode enable_shared enable_static with_pic @@ -1315,7 +1319,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures asn1c 0.9.24 to adapt to many kinds of systems. +\`configure' configures asn1c 0.9.26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1385,7 +1389,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of asn1c 0.9.24:";; + short | recursive ) echo "Configuration of asn1c 0.9.26:";; esac cat <<\_ACEOF @@ -1393,6 +1397,8 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1493,7 +1499,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -asn1c configure 0.9.24 +asn1c configure 0.9.26 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1916,7 +1922,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by asn1c $as_me 0.9.24, which was +It was created by asn1c $as_me 0.9.26, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2731,7 +2737,7 @@ fi # Define the identity of the package. PACKAGE='asn1c' - VERSION='0.9.24' + VERSION='0.9.26' cat >>confdefs.h <<_ACEOF @@ -2775,6 +2781,30 @@ ac_config_headers="$ac_config_headers config.h" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 @@ -13224,7 +13254,7 @@ fi done -ac_config_files="$ac_config_files skeletons/standard-modules/Makefile skeletons/tests/Makefile libasn1compiler/Makefile libasn1parser/Makefile libasn1print/Makefile asn1c/tests/Makefile libasn1fix/Makefile doc/docsrc/Makefile skeletons/Makefile examples/Makefile tests/Makefile asn1c/Makefile doc/Makefile asn1c.spec Makefile" +ac_config_files="$ac_config_files skeletons/tests/Makefile libasn1compiler/Makefile libasn1parser/Makefile libasn1print/Makefile asn1c/tests/Makefile libasn1fix/Makefile doc/docsrc/Makefile skeletons/Makefile examples/Makefile asn1c/Makefile doc/Makefile asn1c.spec Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -13343,6 +13373,10 @@ else am__EXEEXT_FALSE= fi +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -13757,7 +13791,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by asn1c $as_me 0.9.24, which was +This file was extended by asn1c $as_me 0.9.26, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13823,7 +13857,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -asn1c config.status 0.9.24 +asn1c config.status 0.9.26 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -14232,7 +14266,6 @@ do "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "skeletons/standard-modules/Makefile") CONFIG_FILES="$CONFIG_FILES skeletons/standard-modules/Makefile" ;; "skeletons/tests/Makefile") CONFIG_FILES="$CONFIG_FILES skeletons/tests/Makefile" ;; "libasn1compiler/Makefile") CONFIG_FILES="$CONFIG_FILES libasn1compiler/Makefile" ;; "libasn1parser/Makefile") CONFIG_FILES="$CONFIG_FILES libasn1parser/Makefile" ;; @@ -14242,7 +14275,6 @@ do "doc/docsrc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/docsrc/Makefile" ;; "skeletons/Makefile") CONFIG_FILES="$CONFIG_FILES skeletons/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "asn1c/Makefile") CONFIG_FILES="$CONFIG_FILES asn1c/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "asn1c.spec") CONFIG_FILES="$CONFIG_FILES asn1c.spec" ;; diff --git a/configure.ac b/configure.ac index bf710e847..2f82bfe9a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,10 @@ -AC_INIT([asn1c], [0.9.24], [vlm@lionet.info]) +AC_INIT([asn1c], [0.9.26], [vlm@lionet.info]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) +AM_MAINTAINER_MODE + AM_PROG_LIBTOOL dnl Checks for programs. @@ -81,7 +83,6 @@ AC_CHECK_FUNCS(mergesort) AC_CHECK_FUNCS(mkstemps) AC_OUTPUT( \ -skeletons/standard-modules/Makefile \ skeletons/tests/Makefile \ libasn1compiler/Makefile \ libasn1parser/Makefile \ @@ -91,7 +92,6 @@ libasn1fix/Makefile \ doc/docsrc/Makefile \ skeletons/Makefile \ examples/Makefile \ -tests/Makefile \ asn1c/Makefile \ doc/Makefile \ asn1c.spec \ diff --git a/doc/Makefile.in b/doc/Makefile.in index ad96c5815..a4e01576c 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -155,6 +155,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -240,7 +241,7 @@ EXTRA_DIST = $(srcdir)/*.pdf all: all-recursive .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -265,9 +266,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/doc/asn1c-usage.pdf b/doc/asn1c-usage.pdf index dcc0b35ef..9d3c5b93d 100644 Binary files a/doc/asn1c-usage.pdf and b/doc/asn1c-usage.pdf differ diff --git a/doc/docsrc/Makefile.in b/doc/docsrc/Makefile.in index 2df229022..aaeae6091 100644 --- a/doc/docsrc/Makefile.in +++ b/doc/docsrc/Makefile.in @@ -91,6 +91,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -176,7 +177,7 @@ CLEANFILES = *.*~ *.aux *.dvi *.log *.out *.toc all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -201,9 +202,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/doc/docsrc/asn1c-usage.tex b/doc/docsrc/asn1c-usage.tex index 8c44b05f5..40a9d34ac 100644 --- a/doc/docsrc/asn1c-usage.tex +++ b/doc/docsrc/asn1c-usage.tex @@ -102,7 +102,7 @@ \pagestyle{fancy} \fancyhead[L]{\leftmark} -\fancyhead[R]{\href{http://lionet.info/asn1c}{asn1c-0.9.25}} +\fancyhead[R]{\href{http://lionet.info/asn1c}{asn1c-0.9.26}} \maketitle \tableofcontents{} diff --git a/examples/Makefile.am b/examples/Makefile.am index c23d39719..cc3ac1791 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -14,31 +14,32 @@ ASN1_SOURCE_3 = rfc4511.txt ASN1_FILES_3 = \ rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1 -all: $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) +BUILT_SOURCES = $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) $(ASN1_FILES_1): crfc2asn1.pl $(ASN1_SOURCE_1) - ./crfc2asn1.pl $(ASN1_SOURCE_1) + ${srcdir}/crfc2asn1.pl ${srcdir}/$(ASN1_SOURCE_1) $(ASN1_FILES_2): crfc2asn1.pl $(ASN1_SOURCE_2) - ./crfc2asn1.pl $(ASN1_SOURCE_2) + ${srcdir}/crfc2asn1.pl ${srcdir}/$(ASN1_SOURCE_2) $(ASN1_FILES_3): crfc2asn1.pl $(ASN1_SOURCE_3) - ./crfc2asn1.pl $(ASN1_SOURCE_3) - -EXTRA_DIST = $(srcdir)/rfc*.txt \ - $(srcdir)/sample.source.LDAP3 \ - $(srcdir)/sample.source.MEGACO \ - $(srcdir)/sample.source.MHEG5 \ - $(srcdir)/sample.source.RRC \ - $(srcdir)/sample.source.TAP3 \ - $(srcdir)/sample.source.PKIX1 \ - $(srcdir)/sample.makefile.regen - -dist-hook: - rm -f `find $(distdir) -name "*.core" -or -name ".tmp.*"` - rm -f `find $(distdir) -name "*.[ch].??????"` + ${srcdir}/crfc2asn1.pl ${srcdir}/$(ASN1_SOURCE_3) + +EXTRA_DIST = \ + rfc3280.txt rfc3525.txt rfc4511.txt \ + sample.source.LDAP3 \ + sample.source.MEGACO \ + sample.source.MHEG5 \ + sample.source.RRC \ + sample.source.TAP3 \ + sample.source.PKIX1 \ + sample.makefile.regen CLEANFILES = $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) clean-local: - for dir in sample.source.*; do (cd $$dir && make distclean); done + for dir in ${srcdir}/sample.source.*; do (cd $$dir && make distclean); done + +dist-hook: clean-local + rm -f `find $(distdir) -name "*.core" -or -name ".tmp.*"` + rm -f `find $(distdir) -name "*.[ch].??????"` diff --git a/examples/Makefile.in b/examples/Makefile.in index 173077851..e4058bb8a 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -116,6 +116,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -208,20 +209,23 @@ ASN1_SOURCE_3 = rfc4511.txt ASN1_FILES_3 = \ rfc4511-Lightweight-Directory-Access-Protocol-V3.asn1 -EXTRA_DIST = $(srcdir)/rfc*.txt \ - $(srcdir)/sample.source.LDAP3 \ - $(srcdir)/sample.source.MEGACO \ - $(srcdir)/sample.source.MHEG5 \ - $(srcdir)/sample.source.RRC \ - $(srcdir)/sample.source.TAP3 \ - $(srcdir)/sample.source.PKIX1 \ - $(srcdir)/sample.makefile.regen +BUILT_SOURCES = $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) +EXTRA_DIST = \ + rfc3280.txt rfc3525.txt rfc4511.txt \ + sample.source.LDAP3 \ + sample.source.MEGACO \ + sample.source.MHEG5 \ + sample.source.RRC \ + sample.source.TAP3 \ + sample.source.PKIX1 \ + sample.makefile.regen CLEANFILES = $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -246,9 +250,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) @@ -332,13 +336,15 @@ distdir: $(DISTFILES) top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -364,6 +370,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am @@ -430,7 +437,7 @@ ps-am: uninstall-am: uninstall-dist_binSCRIPTS -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local dist-hook distclean distclean-generic \ @@ -446,24 +453,22 @@ uninstall-am: uninstall-dist_binSCRIPTS uninstall-dist_binSCRIPTS -all: $(ASN1_FILES_1) $(ASN1_FILES_2) $(ASN1_FILES_3) - $(ASN1_FILES_1): crfc2asn1.pl $(ASN1_SOURCE_1) - ./crfc2asn1.pl $(ASN1_SOURCE_1) + ${srcdir}/crfc2asn1.pl ${srcdir}/$(ASN1_SOURCE_1) $(ASN1_FILES_2): crfc2asn1.pl $(ASN1_SOURCE_2) - ./crfc2asn1.pl $(ASN1_SOURCE_2) + ${srcdir}/crfc2asn1.pl ${srcdir}/$(ASN1_SOURCE_2) $(ASN1_FILES_3): crfc2asn1.pl $(ASN1_SOURCE_3) - ./crfc2asn1.pl $(ASN1_SOURCE_3) + ${srcdir}/crfc2asn1.pl ${srcdir}/$(ASN1_SOURCE_3) + +clean-local: + for dir in ${srcdir}/sample.source.*; do (cd $$dir && make distclean); done -dist-hook: +dist-hook: clean-local rm -f `find $(distdir) -name "*.core" -or -name ".tmp.*"` rm -f `find $(distdir) -name "*.[ch].??????"` -clean-local: - for dir in sample.source.*; do (cd $$dir && make distclean); done - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/examples/crfc2asn1.pl b/examples/crfc2asn1.pl index d9c8c861c..aaf092004 100755 --- a/examples/crfc2asn1.pl +++ b/examples/crfc2asn1.pl @@ -36,7 +36,7 @@ my $modName = ''; # ASN.1 module name my $rfcid = ''; - $rfcid = $1 . '-' if($ARGV =~ /([a-z0-9]+)/i); + $rfcid = $1 . '-' if($ARGV =~ /([a-z0-9]+)\.[^.]+$/i); if(/^[ \t]*([A-Z][A-Za-z0-9-]*).*DEFINITIONS.*::=/) { $modName = $1; @@ -100,10 +100,10 @@ } # - # The following clauses are primarily designed to make - # asn1c command-line easier (i.e., to avoid "-ftypes88"). + # The following clauses are primarily designed to simplify + # asn1c tool behavior. # You may want to get rid of them if you're doing generic - # ASN.1 extraction and do not want to alter the ASN.1 specs. + # ASN.1 extraction and do not want to alter the ASN.1 specs at all. # if( /^([ \t]*)((UniversalString|BMPString|UTF8String)\s+::=\s+\[[A-Z]+\s\d+\]\sIMPLICIT\sOCTET\sSTRING)(.*)$/ms @@ -113,7 +113,7 @@ next; } elsif(/delete following line if \"new\" types are supported/) { print; - print "/* Legacy stuff deleted by $0:\n"; + print "/* Legacy constructs deleted by $0:\n"; $_ = <>; print; print " */\n"; diff --git a/libasn1compiler/Makefile.in b/libasn1compiler/Makefile.in index eb883d1be..0cfaa4e55 100644 --- a/libasn1compiler/Makefile.in +++ b/libasn1compiler/Makefile.in @@ -116,6 +116,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -217,7 +218,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -242,9 +243,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/libasn1fix/Makefile.am b/libasn1fix/Makefile.am index 65316be65..011eb7636 100644 --- a/libasn1fix/Makefile.am +++ b/libasn1fix/Makefile.am @@ -33,6 +33,7 @@ check_PROGRAMS = check_fixer check_fixer_LDADD = $(noinst_LTLIBRARIES) \ $(top_builddir)/libasn1parser/libasn1parser.la +check_fixer_CPPFLAGS = -DTOP_SRCDIR=${top_srcdir} $(AM_CPPFLAGS) check_fixer_DEPENDENCIES = $(check_fixer_LDADD) TESTS_ENVIRONMENT= ./check_fixer diff --git a/libasn1fix/Makefile.in b/libasn1fix/Makefile.in index 5acf67b6f..be9ef6eee 100644 --- a/libasn1fix/Makefile.in +++ b/libasn1fix/Makefile.in @@ -62,7 +62,7 @@ libasn1fix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libasn1fix_la_LDFLAGS) $(LDFLAGS) -o $@ check_fixer_SOURCES = check_fixer.c -check_fixer_OBJECTS = check_fixer.$(OBJEXT) +check_fixer_OBJECTS = check_fixer-check_fixer.$(OBJEXT) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -125,6 +125,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -235,6 +236,7 @@ libasn1fix_la_SOURCES = \ check_fixer_LDADD = $(noinst_LTLIBRARIES) \ $(top_builddir)/libasn1parser/libasn1parser.la +check_fixer_CPPFLAGS = -DTOP_SRCDIR=${top_srcdir} $(AM_CPPFLAGS) check_fixer_DEPENDENCIES = $(check_fixer_LDADD) TESTS_ENVIRONMENT = ./check_fixer TESTS = ${top_srcdir}/tests/*.asn1 @@ -242,7 +244,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -267,9 +269,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): @@ -322,7 +324,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_retrieve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_tags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asn1fix_value.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_fixer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_fixer-check_fixer.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -345,6 +347,20 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +check_fixer-check_fixer.o: check_fixer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_fixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_fixer-check_fixer.o -MD -MP -MF $(DEPDIR)/check_fixer-check_fixer.Tpo -c -o check_fixer-check_fixer.o `test -f 'check_fixer.c' || echo '$(srcdir)/'`check_fixer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/check_fixer-check_fixer.Tpo $(DEPDIR)/check_fixer-check_fixer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_fixer.c' object='check_fixer-check_fixer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_fixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_fixer-check_fixer.o `test -f 'check_fixer.c' || echo '$(srcdir)/'`check_fixer.c + +check_fixer-check_fixer.obj: check_fixer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_fixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT check_fixer-check_fixer.obj -MD -MP -MF $(DEPDIR)/check_fixer-check_fixer.Tpo -c -o check_fixer-check_fixer.obj `if test -f 'check_fixer.c'; then $(CYGPATH_W) 'check_fixer.c'; else $(CYGPATH_W) '$(srcdir)/check_fixer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/check_fixer-check_fixer.Tpo $(DEPDIR)/check_fixer-check_fixer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_fixer.c' object='check_fixer-check_fixer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(check_fixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o check_fixer-check_fixer.obj `if test -f 'check_fixer.c'; then $(CYGPATH_W) 'check_fixer.c'; else $(CYGPATH_W) '$(srcdir)/check_fixer.c'; fi` + mostlyclean-libtool: -rm -f *.lo diff --git a/libasn1fix/check_fixer.c b/libasn1fix/check_fixer.c index 3d5793e36..86caa6cae 100644 --- a/libasn1fix/check_fixer.c +++ b/libasn1fix/check_fixer.c @@ -13,6 +13,14 @@ #include "asn1fix.h" +#ifndef TOP_SRCDIR +#define TOP_SRCDIR_S ".." +#else +#define STRINGIFY_MACRO2(x) #x +#define STRINGIFY_MACRO(x) STRINGIFY_MACRO2(x) +#define TOP_SRCDIR_S STRINGIFY_MACRO(TOP_SRCDIR) +#endif + static int check(const char *fname, enum asn1p_flags parser_flags, enum asn1f_flags fixer_flags); @@ -182,7 +190,7 @@ check(const char *fname, if(r_value == 0) { asn1p_t *std_asn; - std_asn = asn1p_parse_file("../skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1", A1P_NOFLAGS); + std_asn = asn1p_parse_file(TOP_SRCDIR_S "/skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1", A1P_NOFLAGS); if(std_asn) { asn1p_module_t *mod; while((mod = TQ_REMOVE(&(std_asn->modules), mod_next))) { diff --git a/libasn1parser/Makefile.in b/libasn1parser/Makefile.in index d58cae4de..5ef82e17a 100644 --- a/libasn1parser/Makefile.in +++ b/libasn1parser/Makefile.in @@ -117,6 +117,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -221,7 +222,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -246,9 +247,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/libasn1print/Makefile.in b/libasn1print/Makefile.in index d78dbfbbe..fa3c39bf3 100644 --- a/libasn1print/Makefile.in +++ b/libasn1print/Makefile.in @@ -114,6 +114,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -206,7 +207,7 @@ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -231,9 +232,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/skeletons/Makefile.am b/skeletons/Makefile.am index 33d5f813a..1882057b2 100644 --- a/skeletons/Makefile.am +++ b/skeletons/Makefile.am @@ -1,10 +1,18 @@ -SUBDIRS = . standard-modules tests +SUBDIRS = . tests dist_pkgdata_DATA = \ - $(srcdir)/README \ - $(srcdir)/*.[ch] \ - $(srcdir)/file-dependencies + ${srcdir}/README \ + ${srcdir}/*.[ch] \ + ${srcdir}/file-dependencies + +smodsdir=$(pkgdata) + +nobase_dist_smods_DATA = \ + standard-modules/README \ + standard-modules/ASN1-Object-Identifier-Module.asn1 \ + standard-modules/ASN1C-UsefulInformationObjectClasses.asn1 + uninstall-local: -@echo -n " " diff --git a/skeletons/Makefile.in b/skeletons/Makefile.in index cadb8f411..b04d2393b 100644 --- a/skeletons/Makefile.in +++ b/skeletons/Makefile.in @@ -35,8 +35,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = skeletons -DIST_COMMON = README $(dist_pkgdata_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = README $(dist_pkgdata_DATA) $(nobase_dist_smods_DATA) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -147,8 +147,8 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkgdatadir)" -DATA = $(dist_pkgdata_DATA) +am__installdirs = "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(smodsdir)" +DATA = $(dist_pkgdata_DATA) $(nobase_dist_smods_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -225,6 +225,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -303,11 +304,17 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = . standard-modules tests +SUBDIRS = . tests dist_pkgdata_DATA = \ - $(srcdir)/README \ - $(srcdir)/*.[ch] \ - $(srcdir)/file-dependencies + ${srcdir}/README \ + ${srcdir}/*.[ch] \ + ${srcdir}/file-dependencies + +smodsdir = $(pkgdata) +nobase_dist_smods_DATA = \ + standard-modules/README \ + standard-modules/ASN1-Object-Identifier-Module.asn1 \ + standard-modules/ASN1C-UsefulInformationObjectClasses.asn1 check_LTLIBRARIES = libasn1cskeletons.la libasn1cskeletons_la_CFLAGS = $(TESTSUITE_CFLAGS) @@ -369,7 +376,7 @@ all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -394,9 +401,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): @@ -864,6 +871,29 @@ uninstall-dist_pkgdataDATA: test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files +install-nobase_dist_smodsDATA: $(nobase_dist_smods_DATA) + @$(NORMAL_INSTALL) + test -z "$(smodsdir)" || $(MKDIR_P) "$(DESTDIR)$(smodsdir)" + @list='$(nobase_dist_smods_DATA)'; test -n "$(smodsdir)" || list=; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo "$(MKDIR_P) '$(DESTDIR)$(smodsdir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(smodsdir)/$$dir"; }; \ + echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(smodsdir)/$$dir'"; \ + $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(smodsdir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_dist_smodsDATA: + @$(NORMAL_UNINSTALL) + @list='$(nobase_dist_smods_DATA)'; test -n "$(smodsdir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(smodsdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(smodsdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -1064,7 +1094,7 @@ check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(pkgdatadir)"; do \ + for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(smodsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive @@ -1115,7 +1145,8 @@ info: info-recursive info-am: -install-data-am: install-dist_pkgdataDATA +install-data-am: install-dist_pkgdataDATA \ + install-nobase_dist_smodsDATA install-dvi: install-dvi-recursive @@ -1161,7 +1192,8 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-dist_pkgdataDATA uninstall-local +uninstall-am: uninstall-dist_pkgdataDATA uninstall-local \ + uninstall-nobase_dist_smodsDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive @@ -1174,13 +1206,15 @@ uninstall-am: uninstall-dist_pkgdataDATA uninstall-local install install-am install-data install-data-am \ install-dist_pkgdataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-dist_pkgdataDATA uninstall-local + install-info install-info-am install-man \ + install-nobase_dist_smodsDATA install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-dist_pkgdataDATA uninstall-local \ + uninstall-nobase_dist_smodsDATA uninstall-local: diff --git a/skeletons/standard-modules/Makefile.am b/skeletons/standard-modules/Makefile.am index cc42fbf1c..e2abcbf43 100644 --- a/skeletons/standard-modules/Makefile.am +++ b/skeletons/standard-modules/Makefile.am @@ -2,8 +2,8 @@ smodsdir = $(pkgdatadir)/standard-modules dist_smods_DATA = \ - $(srcdir)/*.asn1 \ - $(srcdir)/README + s/README \ + ${srcdir}/*.asn1 uninstall-local: -@echo -n " " diff --git a/skeletons/standard-modules/Makefile.in b/skeletons/standard-modules/Makefile.in index 5e0ccf536..89196c8d9 100644 --- a/skeletons/standard-modules/Makefile.in +++ b/skeletons/standard-modules/Makefile.in @@ -116,6 +116,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -196,13 +197,13 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ smodsdir = $(pkgdatadir)/standard-modules dist_smods_DATA = \ - $(srcdir)/*.asn1 \ - $(srcdir)/README + ${srcdir}/README \ + ${srcdir}/*.asn1 all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -227,9 +228,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/skeletons/tests/Makefile.am b/skeletons/tests/Makefile.am index f58ef084b..ac05364ec 100644 --- a/skeletons/tests/Makefile.am +++ b/skeletons/tests/Makefile.am @@ -14,7 +14,7 @@ check_PROGRAMS = \ check-PER \ check-PER-INTEGER -AM_LDFLAGS = $(top_srcdir)/skeletons/libasn1cskeletons.la +AM_LDFLAGS = $(top_builddir)/skeletons/libasn1cskeletons.la LDADD = -lm TESTS = $(check_PROGRAMS) diff --git a/skeletons/tests/Makefile.in b/skeletons/tests/Makefile.in index a4f8658c4..0b4b12f54 100644 --- a/skeletons/tests/Makefile.in +++ b/skeletons/tests/Makefile.in @@ -169,6 +169,7 @@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ @@ -248,14 +249,14 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/skeletons -AM_LDFLAGS = $(top_srcdir)/skeletons/libasn1cskeletons.la +AM_LDFLAGS = $(top_builddir)/skeletons/libasn1cskeletons.la LDADD = -lm TESTS = $(check_PROGRAMS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -280,9 +281,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(top_srcdir)/configure: $(am__configure_deps) +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): diff --git a/tests/125-bitstring-constraint-OK.asn1.-X b/tests/125-bitstring-constraint-OK.asn1.-X index 2cccb90bd..34df469b9 100644 --- a/tests/125-bitstring-constraint-OK.asn1.-X +++ b/tests/125-bitstring-constraint-OK.asn1.-X @@ -1,4 +1,4 @@ - +