diff --git a/.gitignore b/.gitignore index 3531299..8faec7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ build node_modules package.json +lib/version.js # generated by dist target AUTHORS diff --git a/configure.ac b/configure.ac index ad9373a..163cc88 100644 --- a/configure.ac +++ b/configure.ac @@ -22,6 +22,13 @@ AC_INIT([ease.js], [0.2.0-dev], [bugs@easejs.org]) AC_CONFIG_AUX_DIR([tools]) AM_INIT_AUTOMAKE([foreign]) +# provide more granular version numbers based on the above AC_INIT line +m4_define([ver_split], m4_split(m4_translit(AC_PACKAGE_VERSION, [-], [.]), [\.])) +AC_SUBST(MAJOR, m4_argn(1, ver_split)) +AC_SUBST(MINOR, m4_argn(2, ver_split)) +AC_SUBST(REV, m4_argn(3, ver_split)) +AC_SUBST(SUFFIX, m4_argn(4, ver_split)) + AC_PROG_MKDIR_P # check for node, which is required for nearly every operation @@ -98,5 +105,5 @@ AS_IF(test "$JAVA" -a ! "$CCJAR", AM_CONDITIONAL(HAS_CCJAR, [test "$CCJAR"]) -AC_CONFIG_FILES([Makefile doc/Makefile package.json]) +AC_CONFIG_FILES([Makefile doc/Makefile package.json lib/version.js]) AC_OUTPUT diff --git a/lib/version.js b/lib/version.js deleted file mode 100644 index e86cb1a..0000000 --- a/lib/version.js +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Provides version information - * - * Copyright (C) 2011, 2012, 2013 Mike Gerwitz - * - * This file is part of ease.js. - * - * ease.js is free software: you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - * - * @author Mike Gerwitz - */ - -/*** DO NOT MODIFY; generated by verset ***/ - -var major = 0, - minor = 2, - rev = 0, - suffix = 'dev', - - version = [ major, minor, rev, suffix ]; - -version.major = major; -version.minor = minor; -version.rev = rev; -version.suffix = suffix; - -version.toString = function() -{ - return this.join( '.' ) - .replace( /\.([^.]+)$/, '-$1' ) - .replace( /-$/, '' ); -}; - -module.exports = version; diff --git a/tools/version.js.tpl b/lib/version.js.in similarity index 95% rename from tools/version.js.tpl rename to lib/version.js.in index 1a5d3ca..0393701 100644 --- a/tools/version.js.tpl +++ b/lib/version.js.in @@ -21,7 +21,7 @@ * @author Mike Gerwitz */ -/*** DO NOT MODIFY; generated by verset ***/ +/*** DO NOT MODIFY; generated by config.status ***/ var major = @MAJOR@, minor = @MINOR@,