From 5292225bcbf9c42057dea1e8174b934c83a7eb0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Thu, 10 Nov 2016 09:57:41 +0100 Subject: [PATCH] Move build system to rebar3 References #15. --- .gitignore | 27 +--- COPYING => LICENSE | 0 Makefile.am | 15 -- configure.ac | 319 --------------------------------------- debian/changelog | 49 ------ debian/compat | 1 - debian/control | 30 ---- debian/copyright | 59 -------- debian/rules | 11 -- debian/source/format | 1 - debian/source/options | 31 ---- debian/watch | 0 ebin/Makefile.am | 41 ----- ebin/yamerl.app.in.in | 1 - ebin/yamerl.appup.in | 10 -- include/Makefile.am | 9 -- m4/ax_compare_version.m4 | 94 ------------ m4/colored-echo.m4 | 75 --------- m4/erlang.m4 | 68 --------- rebar.config | 8 - src/Emakefile.in.in | 14 -- src/Makefile.am | 71 --------- src/yamerl.app.src | 23 +-- 23 files changed, 8 insertions(+), 949 deletions(-) rename COPYING => LICENSE (100%) delete mode 100644 Makefile.am delete mode 100644 configure.ac delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100755 debian/rules delete mode 100644 debian/source/format delete mode 100644 debian/source/options delete mode 100644 debian/watch delete mode 100644 ebin/Makefile.am delete mode 120000 ebin/yamerl.app.in.in delete mode 100644 ebin/yamerl.appup.in delete mode 100644 include/Makefile.am delete mode 100644 m4/ax_compare_version.m4 delete mode 100644 m4/colored-echo.m4 delete mode 100644 m4/erlang.m4 delete mode 100644 src/Emakefile.in.in delete mode 100644 src/Makefile.am diff --git a/.gitignore b/.gitignore index 06fbe34..70b5dae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,14 @@ .sw? .*.sw? *.beam -Makefile.in -/ac-aux/ -/aclocal.m4 -/autom4te.cache/ -/config.h.in -/config.h.in~ -/configure - -# Files produced by Debian package. -build-stamp -configure-stamp -debian/*.debhelper.log -debian/*.substvars -debian/*/ -debian/build/ -debian/files -!debian/source/ # Files produced by rebar. -/.eunit/ -/.rebar/ -/rebar -/deps/ -/ebin/yamerl.app +/_build/ +/doc/ +/ebin /rebar.lock # Elixir Support -/_build/ -/doc/ /mix.lock /yamerl-*-contents.tar.gz *.ez diff --git a/COPYING b/LICENSE similarity index 100% rename from COPYING rename to LICENSE diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 9f8fcf4..0000000 --- a/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -ACLOCAL_FLAGS = -I m4 -ACLOCAL_AMFLAGS = -I m4 - -SUBDIRS = include src ebin testsuite - -EXTRA_DIST = README.md \ - AUTHORS \ - COPYING \ - debian/changelog \ - debian/compat \ - debian/control \ - debian/copyright \ - debian/rules \ - debian/source/format \ - debian/source/options diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 657285e..0000000 --- a/configure.ac +++ /dev/null @@ -1,319 +0,0 @@ -dnl ------------------------------------------------------------------ -dnl Autoconf initialization. -dnl ------------------------------------------------------------------ - -AC_INIT([yamerl], [0.3.3]) - -AC_CONFIG_SRCDIR([src/yamerl_app.erl]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_AUX_DIR([ac-aux]) - -AM_INIT_AUTOMAKE([1.11 -Wall foreign]) - -AC_PREREQ([2.64]) - -ECHO=echo -COLORED_ECHO_INIT - -dnl ------------------------------------------------------------------ -dnl Internal functions for this configure script. -dnl ------------------------------------------------------------------ - -dnl EMKOPTS is used by Emakefile(s). -append_to_EMKOPTS () { - if test -z "[$]EMKOPTS"; then - EMKOPTS="[$]1" - else - EMKOPTS="[$]{EMKOPTS% }, [$]1" - fi -} - -dnl Expand shell variables to have a nice output in the final report. -expand_var () { - local v=`eval echo '$'[$]1` - while test "`echo [$]v | grep [[$]] > /dev/null && echo nok`"; do - v=`eval echo [$]v` - done - echo [$]v -} - -dnl ------------------------------------------------------------------ -dnl Options. -dnl ------------------------------------------------------------------ - -dnl Debugging option. -AC_ARG_ENABLE([debug], - AC_HELP_STRING([--enable-debug], - [turn on debugging [[default=yes]]]),, - enable_debug=yes) -if test "x${enable_debug}" = "xyes"; then - append_to_EMKOPTS "{d, debug}" -fi - -AC_ARG_ENABLE([warnings], - AC_HELP_STRING([--enable-warnings], - [treat warnings as errors [[default=no]]]),, - enable_warnings=no) -if test "x${enable_warnings}" = "xyes"; then - append_to_EMKOPTS "warnings_as_errors" -fi - -AC_ARG_ENABLE([export_all], - AC_HELP_STRING([--enable-export-all], - [export all Erlang functions [[default=no]]]),, - enable_export_all=no) -if test "x${enable_export_all}" = "xyes"; then - append_to_EMKOPTS "export_all" -fi - -dnl Include debug symbols. -append_to_EMKOPTS "debug_info" - -dnl Print any warnings. -append_to_EMKOPTS "report_warnings" -append_to_EMKOPTS "{warn_format, 1}" -append_to_EMKOPTS "warn_export_vars" -append_to_EMKOPTS "warn_shadow_vars" -append_to_EMKOPTS "warn_unused_import" - -dnl ------------------------------------------------------------------ -dnl Erlang environment. -dnl ------------------------------------------------------------------ - -echo -COLORED_ECHO([%BErlang environment%b]) - -dnl Available flags. -AC_ARG_WITH([erlang], - AC_HELP_STRING([--with-erlang=PREFIX], - [prefix where Erlang is installed (optional)]), - with_erlang=${withval%/}, - with_erlang="") - -dnl erl(1) is used to compile Erlang modules. -if test "x${with_erlang}" = "x"; then - AC_ERLANG_PATH_ERL - AC_ERLANG_PATH_ERLC -else - erl_path="${with_erlang}/bin" - AC_ERLANG_PATH_ERL(, [$erl_path$PATH_SEPARATOR$PATH]) - AC_ERLANG_PATH_ERLC(, [$erl_path$PATH_SEPARATOR$PATH]) -fi - -if test "x${ERL}" = "x"; then - AC_MSG_ERROR([ -Erlang not found. Fill the ERL variable with erl(1) path or provide -Erlang prefix with --with-erlang.]) -fi - -dnl escript(1) is used by the testsuite. -AC_ARG_VAR([ESCRIPT], [Erlang/OTP interpreter command [autodetected]]) - -if test "x${ESCRIPT}" = "x"; then - if test "x${with_erlang}" = "x"; then - AC_PATH_PROG([ESCRIPT], [escript],,) - else - erl_path="${with_erlang}/bin" - AC_PATH_PROG([ESCRIPT], [escript],, - [$erl_path$PATH_SEPARATOR$PATH]) - fi -else - AC_MSG_CHECKING([for escript]) - AC_MSG_RESULT([$ESCRIPT]) -fi - -if test "x${ESCRIPT}" = "x"; then - AC_MSG_WARN([ -escript(1) not found. Fill the ESCRIPT variable with escript(1) path if -you want to use the testsuite.]) -fi - -dnl dialyzer(1) is used by the testsuite. -AC_ARG_VAR([DIALYZER], [Erlang/OTP discrepancy analyzer [autodetected]]) - -if test "x${DIALYZER}" = "x"; then - if test "x${with_erlang}" = "x"; then - AC_PATH_PROG([DIALYZER], [dialyzer],,) - else - erl_path="${with_erlang}/bin" - AC_PATH_PROG([DIALYZER], [dialyzer],, - [$erl_path$PATH_SEPARATOR$PATH]) - fi -else - AC_MSG_CHECKING([for dialyzer]) - AC_MSG_RESULT([$DIALYZER]) -fi - -if test "x${DIALYZER}" = "x"; then - AC_MSG_WARN([ -dialyzer(1) not found. Fill the DIALYZER variable with dialyzer(1) path if -you want it to be run during the testsuite.]) -fi - -dnl Declare ERL_LIBS as precious. -AC_ARG_VAR([ERL_LIBS], [Erlang/OTP applications search path [none]]) - -dnl Get Erlang $ROOT dir and lib dir. -AC_ERLANG_SUBST_ROOT_DIR -AC_ERLANG_SUBST_LIB_DIR - -dnl Get ERTS version. -ERLANG_CHECK_ERTS -ERLANG_CHECK_RELEASE - -dnl Erlang R14B02 (ERTS 5.8.3) is required. -AX_COMPARE_VERSION([${ERLANG_ERTS_VER}], [ge], [5.8.3], - [is_erlang_r14b02="yes"], - [is_erlang_r14b02="no"]) -if test "x${is_erlang_r14b02}" = "xno"; then - AC_MSG_ERROR([ -Erlang R14B02 is required but only Erlang $ERLANG_RELEASE was found!]) -fi - -dnl Determine directories for installation. -if test "x${prefix}" = "xNONE"; then - dnl Inside Erlang lib directory. - ERLANG_INSTALL_LIB_DIR="${ERLANG_LIB_DIR}" -else - dnl Under $prefix - ERLANG_INSTALL_LIB_DIR="${prefix}" -fi - -AC_ERLANG_SUBST_INSTALL_LIB_DIR -AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) - -dnl ------------------------------------------------------------------ -dnl Erlang applicatons. -dnl ------------------------------------------------------------------ - -dnl "compiler" install directory. -AC_ARG_WITH([erlang_compiler], - AC_HELP_STRING([--with-erlang-compiler=PREFIX], - [prefix where the "compiler" Erlang application is installed (optional)]), - with_erlang_compiler=${withval%/}, - with_erlang_compiler="") - -ERL_LIBS_save=$ERL_LIBS -if test "x${with_erlang_compiler}" != "x"; then - ERL_LIBS="${with_erlang_compiler}:${ERL_LIBS}" -fi -export ERL_LIBS -AC_ERLANG_CHECK_LIB([compiler],, [AC_MSG_ERROR([ -"compiler" Erlang application not found. - -Provide compiler install path with --with-erlang-compiler.])]) -ERL_LIBS=$ERL_LIBS_save -export ERL_LIBS - -dnl "tools" install directory. -AC_ARG_WITH([erlang_tools], - AC_HELP_STRING([--with-erlang-tools=PREFIX], - [prefix where the "tools" Erlang application is installed (optional)]), - with_erlang_tools=${withval%/}, - with_erlang_tools="") - -ERL_LIBS_save=$ERL_LIBS -if test "x${with_erlang_tools}" != "x"; then - ERL_LIBS="${with_erlang_tools}:${ERL_LIBS}" -fi -export ERL_LIBS -AC_ERLANG_CHECK_LIB([tools],, [AC_MSG_ERROR([ -"tools" Erlang application not found. - -Provide tools install path with --with-erlang-tools.])]) -ERL_LIBS=$ERL_LIBS_save -export ERL_LIBS - -dnl "eunit" install directory. -AC_ARG_WITH([erlang_eunit], - AC_HELP_STRING([--with-erlang-eunit=PREFIX], - [prefix where the "eunit" Erlang application is installed (optional)]), - with_erlang_eunit=${withval%/}, - with_erlang_eunit="") - -ERL_LIBS_save=$ERL_LIBS -if test "x${with_erlang_eunit}" != "x"; then - ERL_LIBS="${with_erlang_eunit}:${ERL_LIBS}" -fi -export ERL_LIBS -AC_ERLANG_CHECK_LIB([eunit],, [AC_MSG_WARN([ -"eunit" Erlang application not found. - -Provide eunit install path with --with-erlang-eunit.])]) -ERL_LIBS=$ERL_LIBS_save -export ERL_LIBS - -dnl "yamler" install directory. -AC_ARG_WITH([erlang_yamler], - AC_HELP_STRING([--with-erlang-yamler=PREFIX], - [prefix where the "yamler" Erlang application is installed (optional)]), - with_erlang_yamler=${withval%/}, - with_erlang_yamler="") - -ERL_LIBS_save=$ERL_LIBS -if test "x${with_erlang_yamler}" != "x"; then - ERL_LIBS="${with_erlang_yamler}:${ERL_LIBS}" -fi -export ERL_LIBS -AC_ERLANG_CHECK_LIB([yamler]) -ERL_LIBS=$ERL_LIBS_save -export ERL_LIBS - -AM_CONDITIONAL([HAVE_YAMLER], [test x"$ERLANG_LIB_DIR_yamler" != x"not found"]) - -dnl ------------------------------------------------------------------ -dnl Final substitutions. -dnl ------------------------------------------------------------------ - -AC_SUBST(EMKOPTS) - -AC_SUBST(APP_RELEASE_DATE) -AC_SUBST(APP_DISTSUFFIX) - -exp_ERLANG_INSTALL_LIB_DIR_yamerl=`expand_var ERLANG_INSTALL_LIB_DIR_yamerl` -AC_SUBST(exp_ERLANG_INSTALL_LIB_DIR_yamerl) - -dnl ------------------------------------------------------------------ -dnl Autoconf output. -dnl ------------------------------------------------------------------ - -echo -AM_CONFIG_HEADER([config.h]) -AC_CONFIG_FILES([ - include/Makefile - src/Makefile - src/Emakefile.in - ebin/Makefile - ebin/yamerl.app.in - ebin/yamerl.appup - testsuite/Makefile - testsuite/etest - Makefile -]) -AC_CONFIG_FILES([ - testsuite/dialyzer -], [chmod +x testsuite/dialyzer]) -AC_CONFIG_FILES([ - testsuite/benchmark -], [chmod +x testsuite/benchmark]) -AC_OUTPUT - -dnl -------------------------------------------------- -dnl Configuration report -dnl -------------------------------------------------- - -echo -COLORED_ECHO([ %B== ${PACKAGE_NAME} ${PACKAGE_VERSION}${APP_DISTSUFFIX} ==%b]) -echo -COLORED_ECHO([Configuration:]) -COLORED_ECHO([ Prefix: ${prefix}]) -COLORED_ECHO([ Application dir.: ${exp_ERLANG_INSTALL_LIB_DIR_yamerl}]) -echo -COLORED_ECHO([ Erlang emulator: ${ERL}]) -COLORED_ECHO([ Erlang compiler: ${ERLC}]) -COLORED_ECHO([ Erlang interpreter: ${ESCRIPT}]) -echo -COLORED_ECHO([ Debug: ${enable_debug}]) -COLORED_ECHO([ Warnings as errors: ${enable_warnings}]) -COLORED_ECHO([ Export all: ${enable_export_all}]) -echo diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 4dcf9bf..0000000 --- a/debian/changelog +++ /dev/null @@ -1,49 +0,0 @@ -erlang-yamerl (0.3.3-1) stable; urgency=low - - * yamerl_parser: Fix an infinite loop with "key:" - - -- Jean-Sébastien Pédron Sun, 30 Oct 2016 00:38:26 +0200 - -erlang-yamerl (0.3.2-1) stable; urgency=low - - * yamerl_parser: Don't build with HiPE by default - * Elixir/hex.pm support - * Fix generation of yamerl.app with nawk(1) - - -- Jean-Sébastien Pédron Sat, 28 Mar 2015 01:43:31 +0100 - -erlang-yamerl (0.3.1-1) stable; urgency=low - - * Fix bug with re:run/3 usage and Unicode string (#5). - * yamerl_constr: Ensure the node module is loaded. - * Allow to run the testsuite using rebar. - * Improve documentation. - - -- Jean-Sébastien Pédron Tue, 22 Jul 2014 16:52:57 +0200 - -erlang-yamerl (0.3.0-1) stable; urgency=low - - * Rename application to "yamerl". - * Fix Debian package. - - -- Jean-Sébastien Pédron Wed, 26 Mar 2014 11:08:22 +0100 - -erlang-yaml (0.2.0-1) experimental; urgency=low - - * Package for Erlang R15B03. - - -- Jean-Sébastien Pédron Tue, 11 Sep 2012 15:22:24 +0200 - -erlang-yaml (0.1.1-1) experimental; urgency=low - - * Add float support - * Add YAML failsafe/json/core schemas - * Bugfixes - - -- Jean-Sébastien Pédron Fri, 27 Jan 2012 10:33:02 +0100 - -erlang-yaml (0.1.0-1) experimental; urgency=low - - * Initial release. - - -- Jean-Sébastien Pédron Thu, 23 Jun 2011 17:56:47 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control deleted file mode 100644 index a9226f4..0000000 --- a/debian/control +++ /dev/null @@ -1,30 +0,0 @@ -Source: erlang-yamerl -Section: devel -Priority: optional -Maintainer: Jean-Sébastien Pédron -Uploaders: Christopher Faulet , - Jean-Sébastien Pédron -Build-Depends: debhelper (>= 9), - dh-autoreconf, - erlang-base-hipe | erlang-base, - erlang-tools, - erlang-eunit, - erlang-xmerl, - erlang-dev -Standards-Version: 3.9.4 - -Package: erlang-yamerl -Architecture: all -Depends: ${misc:Depends}, ${erlang:Depends} -Description: Pure Erlang YAML 1.2 parser - YAML is a human-friendly, cross language, Unicode based data - serialization language designed around the common native data types of - agile programming languages - . - yamerl is a pure Erlang application which is able to parse YAML 1.1 - and YAML 1.2 documents, as well as JSON documents. It only depends on - standard Erlang/OTP applications, no external dependency is required. - It doesn't use native code either (neither port drivers nor NIFs) - . - yamerl is distributed under the terms of the 2-clause BSD license; see - COPYING. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 53af293..0000000 --- a/debian/copyright +++ /dev/null @@ -1,59 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: yamerl -Upstream-Contact: Jean-Sébastien Pédron -Source: https://github.com/yakaz/yamerl - -Files: * -Copyright: 2012-2014, Yakaz - 2016, Jean-Sébastien Pédron -License: BSD-2-clause - Copyright (c) 2012-2014 Yakaz - Copyright (c) 2016 Jean-Sébastien Pédron - All rights reserved. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - -Files: testsuite/data/benchmark/mochijson2.erl -Copyright: 2007, Mochi Media, Inc. -License: Expat - This is the MIT license. - . - Copyright (c) 2007 Mochi Media, Inc. - . - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - . - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 7124dd1..0000000 --- a/debian/rules +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ --parallel --with autoreconf - -override_dh_auto_configure: - dh_auto_configure -- --prefix=/usr/lib/erlang/lib diff --git a/debian/source/format b/debian/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/debian/source/options b/debian/source/options deleted file mode 100644 index 68b8901..0000000 --- a/debian/source/options +++ /dev/null @@ -1,31 +0,0 @@ -tar-ignore = *.a -tar-ignore = *.la -tar-ignore = *.o -tar-ignore = *.so -tar-ignore = .*.sw? -tar-ignore = */*~ -tar-ignore = ,,* -tar-ignore = .[#~]* -tar-ignore = .arch-ids -tar-ignore = .arch-inventory -tar-ignore = .be -tar-ignore = .bzr -tar-ignore = .bzr.backup -tar-ignore = .bzr.tags -tar-ignore = .bzrignore -tar-ignore = .cvsignore -tar-ignore = .deps -tar-ignore = .git -tar-ignore = .gitattributes -tar-ignore = .gitignore -tar-ignore = .hg -tar-ignore = .hgignore -tar-ignore = .hgtags -tar-ignore = .shelf -tar-ignore = .svn -tar-ignore = CVS -tar-ignore = DEADJOE -tar-ignore = RCS -tar-ignore = _MTN -tar-ignore = _darcs -tar-ignore = {arch} diff --git a/debian/watch b/debian/watch deleted file mode 100644 index e69de29..0000000 diff --git a/ebin/Makefile.am b/ebin/Makefile.am deleted file mode 100644 index 4ede1a7..0000000 --- a/ebin/Makefile.am +++ /dev/null @@ -1,41 +0,0 @@ -beamdir = $(ERLANG_INSTALL_LIB_DIR_yamerl)/ebin - -APP_NAME = $(PACKAGE_NAME) -APP_FILES = $(APP_NAME).app $(APP_NAME).appup - -BEAM_FILES = *.beam - -beam_DATA = $(APP_FILES) $(BEAM_FILES) - -CLEANFILES = $(APP_NAME).app $(BEAM_FILES) - -# $(APP_NAME).app is generated automatically with all the BEAM files -# present in the ebin/ directory. -$(APP_NAME).app: Makefile.am $(APP_NAME).app.in - @echo "Generate: $@" - @src=`echo $$(ls $(BEAM_FILES) | sort)`; \ - $(AWK) -v src="$$src" \ - "/{vsn, *{cmd,/ { \ - line = \$$0; \ - sub(/{vsn.*/, \"{vsn, \\\"$(VERSION)\\\"},\", line); \ - print line; \ - next; \ - } \ - { print; } \ - /% DO NOT EDIT: Modules list is generated/ { \ - indent = index(\$$0, \"%\"); \ - indent = substr(\$$0, 1, indent - 1); \ - split(src, mods); \ - mods_count = 0; \ - for (mod in mods) { \ - mods_count++ \ - } \ - for (i = 1; i <= mods_count; i++) { \ - mod = mods[i]; \ - sub(/\.beam/, \"\", mod); \ - if (i != mods_count) \ - print indent mod \",\"; \ - else \ - print indent mod \ - } \ - }" $(APP_NAME).app.in > $@ diff --git a/ebin/yamerl.app.in.in b/ebin/yamerl.app.in.in deleted file mode 120000 index 082e38f..0000000 --- a/ebin/yamerl.app.in.in +++ /dev/null @@ -1 +0,0 @@ -../src/yamerl.app.src \ No newline at end of file diff --git a/ebin/yamerl.appup.in b/ebin/yamerl.appup.in deleted file mode 100644 index be03db2..0000000 --- a/ebin/yamerl.appup.in +++ /dev/null @@ -1,10 +0,0 @@ -%% -*-erlang-*- -%% vim:ft=erlang: - -{ "@VERSION@", - [ - %% To upgrade from the specified version to current one. - ], [ - %% To downgrade from the current version to the specified one. - ] -}. diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index 6eb5c55..0000000 --- a/include/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -headersdir = $(ERLANG_INSTALL_LIB_DIR_yamerl)/include - -nobase_dist_headers_DATA = yamerl_types.hrl \ - yamerl_errors.hrl \ - yamerl_tokens.hrl \ - yamerl_nodes.hrl \ - yamerl_nodes_yamerl_extensions.hrl \ - internal/yamerl_parser.hrl \ - internal/yamerl_constr.hrl diff --git a/m4/ax_compare_version.m4 b/m4/ax_compare_version.m4 deleted file mode 100644 index 55ce0c4..0000000 --- a/m4/ax_compare_version.m4 +++ /dev/null @@ -1,94 +0,0 @@ -dnl Macro to compare version numbers in configure. -dnl - -AC_DEFUN([AX_COMPARE_VERSION], [ - # Used to indicate true or false condition - ax_compare_version=false - - # Convert the two version strings to be compared into a format that - # allows a simple string comparison. The end result is that a version - # string of the form 1.12.5-r617 will be converted to the form - # 0001001200050617. In other words, each number is zero padded to four - # digits, and non digits are removed. - AS_VAR_PUSHDEF([A],[ax_compare_version_A]) - A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - AS_VAR_PUSHDEF([B],[ax_compare_version_B]) - B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \ - -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \ - -e 's/[[^0-9]]//g'` - - dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary - dnl # then the first line is used to determine if the condition is true. - dnl # The sed right after the echo is to remove any indented white space. - m4_case(m4_tolower($2), - [lt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [gt],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"` - ], - [le],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ], - [ge],[ - ax_compare_version=`echo "x$A -x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` - ],[ - dnl Split the operator from the subversion count if present. - m4_bmatch(m4_substr($2,2), - [0],[ - # A count of zero means use the length of the shorter version. - # Determine the number of characters in A and B. - ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'` - ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'` - - # Set A to no more than B's length and B to no more than A's length. - A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"` - B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"` - ], - [[0-9]+],[ - # A count greater than zero means use only that many subversions - A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` - ], - [.+],[ - AC_WARNING( - [illegal OP numeric parameter: $2]) - ],[]) - - # Pad zeros at end of numbers to make same length. - ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`" - B="$B`echo $A | sed 's/./0/g'`" - A="$ax_compare_version_tmp_A" - - # Check for equality or inequality as necessary. - m4_case(m4_tolower(m4_substr($2,0,2)), - [eq],[ - test "x$A" = "x$B" && ax_compare_version=true - ], - [ne],[ - test "x$A" != "x$B" && ax_compare_version=true - ],[ - AC_WARNING([illegal OP parameter: $2]) - ]) - ]) - - AS_VAR_POPDEF([A])dnl - AS_VAR_POPDEF([B])dnl - - dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE. - if test "$ax_compare_version" = "true" ; then - m4_ifvaln([$4],[$4],[:])dnl - m4_ifvaln([$5],[else $5])dnl - fi -]) dnl AX_COMPARE_VERSION diff --git a/m4/colored-echo.m4 b/m4/colored-echo.m4 deleted file mode 100644 index 0a7ae06..0000000 --- a/m4/colored-echo.m4 +++ /dev/null @@ -1,75 +0,0 @@ -dnl -dnl Macro to output bold and colored text. -dnl - -dnl COLORED_ECHO_INIT -dnl This macro must be called first to initialize a context. -AC_DEFUN([COLORED_ECHO_INIT], -[ - dnl Prepare fancy console output, taken from GNU shtools. - colored_echo_bold='' - colored_echo_norm='' - - AC_PROG_AWK - if test x"$AWK" = x"not found"; then - return - fi - - case $TERM in - xterm|xterm*|vt220|vt220*) - dnl For the most important terminal types we directly know the - dnl sequences. - colored_echo_bold=`$AWK 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' /dev/null` - colored_echo_norm=`$AWK 'BEGIN { printf("%c%c%c", 27, 91, 109); }' /dev/null` - ;; - - vt100|vt100*|cygwin) - colored_echo_bold=`$AWK 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' /dev/null` - colored_echo_norm=`$AWK 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' /dev/null` - ;; - - *) - dnl For all others, we try to use a possibly existing `tput' or - dnl `tcout' utility. - paths=`$ECHO $PATH | sed -e 's/:/ /g'` - for tool in tput tcout; do - for dir in $paths; do - if test -r "$dir/$tool" ; then - for seq in bold md smso; do - bold="`$dir/$tool $seq 2>/dev/null`" - if test ".$bold" != . ; then - colored_echo_bold="$bold" - break - fi - done - if test ".$colored_echo_bold" != . ; then - for seq in sgr0 me rmso init reset; do - norm="`$dir/$tool $seq 2>/dev/null`" - if test ".$norm" != . ; then - colored_echo_norm="$norm" - break - fi - done - fi - break - fi - done - if test x"$colored_echo_bold" != "x" -a x"$colored_echo_norm" != "x"; then - break; - fi - done - ;; - esac -]) - -dnl COLORED_ECHO(TEXT) -dnl Output text with: -dnl o everything between %B and %b displayed bold. -AC_DEFUN([COLORED_ECHO], -[ - text=`$ECHO $seo "$1" | sed -e "s/%B/${colored_echo_bold}/g" -e "s/%b/${colored_echo_norm}/g" 2>/dev/null` - $ECHO $seo "$text" - - text=`$ECHO $sec "$1" | sed -e "s/%B//g" -e "s/%b//g" 2>/dev/null` - _AS_ECHO_LOG($text) -]) diff --git a/m4/erlang.m4 b/m4/erlang.m4 deleted file mode 100644 index 88355d8..0000000 --- a/m4/erlang.m4 +++ /dev/null @@ -1,68 +0,0 @@ -dnl -dnl More functions to query Erlang environment. -dnl - -dnl ERLANG_CHECK_ERTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl Substitudes -dnl ERLANG_ERTS_DIR -dnl ERLANG_ERTS_VER -AC_DEFUN([ERLANG_CHECK_ERTS], -[ -AC_REQUIRE([AC_ERLANG_PATH_ERLC])[]dnl -AC_REQUIRE([AC_ERLANG_PATH_ERL])[]dnl -AC_REQUIRE([AC_ERLANG_SUBST_ROOT_DIR])[]dnl -AC_CACHE_CHECK([for Erlang/OTP ERTS version], - [erlang_cv_erts_ver], - [ - AC_LANG_PUSH(Erlang)[]dnl - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([], [dnl - file:write_file("conftest.out", erlang:system_info(version)), - halt(0)])], - [erlang_cv_erts_ver=`cat conftest.out`], - [if test ! -f conftest.out; then - AC_MSG_FAILURE([test Erlang program execution failed]) - else - erlang_cv_erts_ver="not found" - fi]) - AC_LANG_POP(Erlang)[]dnl - ]) -AC_CACHE_CHECK([for Erlang/OTP ERTS directory], - [erlang_cv_erts_dir], - [ - erlang_cv_erts_dir="${ERLANG_ROOT_DIR}/erts-$erlang_cv_erts_ver" - if test ! -d "$erlang_cv_erts_dir"; then - erlang_cv_erts_dir="${ERLANG_ROOT_DIR}/usr" - fi - ]) -AC_SUBST([ERLANG_ERTS_DIR], [$erlang_cv_erts_dir]) -AC_SUBST([ERLANG_ERTS_VER], [$erlang_cv_erts_ver]) -AS_IF([test "$erlang_cv_erts_ver" = "not found"], [$2], [$1]) -]) - -dnl ERLANG_CHECK_RELEASE() -dnl Substitudes -dnl ERLANG_RELEASE -AC_DEFUN([ERLANG_CHECK_RELEASE], -[ -AC_REQUIRE([AC_ERLANG_PATH_ERLC])[]dnl -AC_REQUIRE([AC_ERLANG_PATH_ERL])[]dnl -AC_REQUIRE([AC_ERLANG_SUBST_ROOT_DIR])[]dnl -AC_CACHE_CHECK([for Erlang/OTP release], - [erlang_cv_release], - [ - AC_LANG_PUSH(Erlang)[]dnl - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([], [dnl - file:write_file("conftest.out", erlang:system_info(otp_release)), - halt(0)])], - [erlang_cv_release=`cat conftest.out`], - [if test ! -f conftest.out; then - AC_MSG_FAILURE([test Erlang program execution failed]) - else - erlang_cv_release="not found" - fi]) - AC_LANG_POP(Erlang)[]dnl - ]) -AC_SUBST([ERLANG_RELEASE], [$erlang_cv_release]) -]) diff --git a/rebar.config b/rebar.config index a9d088f..c9d7f17 100644 --- a/rebar.config +++ b/rebar.config @@ -1,10 +1,2 @@ %% -*-erlang-*- %% vim:ft=erlang: - -{pre_hooks, [ - {eunit, "./testsuite/prepare-testsuite-for-rebar"} - ]}. - -{post_hooks, [ - {clean, "rm -rf test"} - ]}. diff --git a/src/Emakefile.in.in b/src/Emakefile.in.in deleted file mode 100644 index 94b134a..0000000 --- a/src/Emakefile.in.in +++ /dev/null @@ -1,14 +0,0 @@ -%% -*-erlang-*- -%% vim:ft=erlang: - -{ - [ - %% DO NOT EDIT: Modules list is generated by Makefile.am. - ], - [ - @EMKOPTS@, - {outdir, "@builddir@/../ebin"}, - {i, "@top_srcdir@/include"}, - {i, "@top_builddir@/include"} - ] -}. diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index c250b5c..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,71 +0,0 @@ -erlsrcdir = $(ERLANG_INSTALL_LIB_DIR_yamerl)/src - -dist_erlsrc_DATA = yamerl_app.erl \ - yamerl_sup.erl \ - yamerl_errors.erl \ - yamerl_parser.erl \ - yamerl_constr.erl \ - yamerl_node_seq.erl \ - yamerl_node_map.erl \ - yamerl_node_str.erl \ - yamerl_node_str_json.erl \ - yamerl_node_null.erl \ - yamerl_node_null_json.erl \ - yamerl_node_bool.erl \ - yamerl_node_bool_json.erl \ - yamerl_node_bool_ext.erl \ - yamerl_node_int.erl \ - yamerl_node_int_json.erl \ - yamerl_node_int_ext.erl \ - yamerl_node_float.erl \ - yamerl_node_float_json.erl \ - yamerl_node_float_ext.erl \ - yamerl_node_size.erl \ - yamerl_node_timestamp.erl \ - yamerl_node_ipaddr.erl \ - yamerl_node_erlang_atom.erl \ - yamerl_node_erlang_fun.erl \ - yamerl_yamler_compat.erl \ - yamerl.erl - -CLEANFILES = Emakefile - -all-local: Emakefile - @$(ERL) +B -noshell \ - -pa @top_builddir@/ebin \ - -eval "case make:all() of \ - up_to_date -> \ - halt(0); \ - Err -> \ - io:format(\"~p~n\", [Err]), \ - halt(1) \ - end" - -# Emakefile is generated automatically with the source files declared above. -Emakefile: Makefile.am Emakefile.in - @echo "Generate: $@" - @$(AWK) -v src='$(dist_erlsrc_DATA)' \ - "{ print } \ - /% DO NOT EDIT: Modules list is generated/ { \ - indent = index(\$$0, \"%\"); \ - indent = substr(\$$0, 1, indent - 1); \ - split(src, files); \ - files_count = 0; \ - for (file in files) { \ - files_count++ \ - } \ - mods_count = 0; \ - for (i = 1; i <= files_count; i++) { \ - if (files[i] !~ /\.erl$$/) \ - continue; \ - mods[++mods_count] = files[i] \ - } \ - for (i = 1; i <= mods_count; i++) { \ - mod = mods[i]; \ - sub(/\.erl/, \"\", mod); \ - if (i != mods_count) \ - print indent \"'$(srcdir)/\" mod \"',\";\ - else \ - print indent \"'$(srcdir)/\" mod \"'\" \ - } \ - }" Emakefile.in > $@ diff --git a/src/yamerl.app.src b/src/yamerl.app.src index fae0ebf..435b937 100644 --- a/src/yamerl.app.src +++ b/src/yamerl.app.src @@ -5,10 +5,8 @@ {description, "YAML parser in pure Erlang" }, - {vsn, {cmd, "awk '/^AC_INIT\\(/ { ver=$0; sub(/AC_INIT\\(\\[[^]]+\\], *\\[/, \"\", ver); sub(/\\].*/, \"\", ver); print ver; } { next; }' configure.ac"}}, - {modules, [ - %% DO NOT EDIT: Modules list is generated by Makefile.am. - ]}, + {vsn, "0.4.0"}, + {modules, []}, {registered, [yamerl_sup]}, {applications, [ kernel, @@ -20,24 +18,13 @@ %% DO NOT EDIT: The final configuration is made in sys.config. {node_mods, []} ]}, + + %% Hex.pm package informations. {maintainers, [ - "Yakaz", "Jean-Sebastien Pedron " ]}, {licenses, ["BSD 2-Clause"]}, {links, [ - {"GitHub", "https://github.com/yakaz/yamerl"}, - {"Doc", "https://github.com/yakaz/yamerl/tree/master/doc"} - ]}, - {files, [ - "rebar.config", - "configure.ac", % The package version is taken there. - "include/*.hrl", - "include/internal/*.hrl", - "src/yamerl.app.src", - "src/*.erl", - "README.md", - "AUTHORS", - "COPYING" + {"Github", "https://github.com/yakaz/yamerl"} ]} ]}.