Browse Source

Replace DUK_CMDLINE_BAREBONES w/ DUK_CMDLINE_FANCY

The default is a barebones build and it happens without any specific options.
This is a better default for people trying Duktape out for the first time.
v1.0-maintenance
Sami Vaarala 10 years ago
parent
commit
783aa3892f
  1. 2
      Makefile
  2. 11
      dist-files/Makefile.cmdline
  3. 13
      examples/cmdline/duk_cmdline.c

2
Makefile

@ -214,7 +214,7 @@ CCOPTS_SHARED += -DDUK_OPT_DEBUG_BUFSIZE=512
#CCOPTS_SHARED += -DDUK_OPT_NO_ES6_PROXY
#CCOPTS_SHARED += -DDUK_OPT_NO_ZERO_BUFFER_DATA
#CCOPTS_SHARED += -DDUK_OPT_USER_INITJS='"this.foo = 123"'
#CCOPTS_SHARED += -DDUK_CMDLINE_BAREBONES
CCOPTS_SHARED += -DDUK_CMDLINE_FANCY
CCOPTS_NONDEBUG = $(CCOPTS_SHARED) -Os -fomit-frame-pointer
CCOPTS_NONDEBUG += -g -ggdb
#CCOPTS_NONDEBUG += -DDUK_OPT_ASSERTIONS

11
dist-files/Makefile.cmdline

@ -13,13 +13,10 @@ CCOPTS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer
CCOPTS += -I./src
CCLIBS = -lm
# With this option duk_cmdline.c will not assume readline and will be as
# portable as possible.
CCOPTS += -DDUK_CMDLINE_BAREBONES
# If you have readline, you may want to comment out -DDUK_CMDLINE_BAREBONES
# and enable these. On some platforms -lreadline also requires -lncurses
# (e.g. RHEL), so it is added by default (you may be able to remove it)
# If you have readline, you may want to enable these. On some platforms
# -lreadline also requires -lncurses (e.g. RHEL), so it is added by default
# (you may be able to remove it)
#CCOPTS += -DDUK_CMDLINE_FANCY
#CCLIBS += -lreadline
#CCLIBS += -lncurses

13
examples/cmdline/duk_cmdline.c

@ -1,18 +1,11 @@
/*
* Command line execution tool. Used by test cases and other manual testing.
*
* For maximum portability, compile with -DDUK_CMDLINE_BAREBONES
* To enable readline and other fancy stuff, compile with -DDUK_CMDLINE_FANCY
* (it is not the default to maximize portability).
*/
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || \
defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
#ifndef DUK_CMDLINE_BAREBONES
/* Force barebones mode on Windows. */
#define DUK_CMDLINE_BAREBONES
#endif
#endif
#ifdef DUK_CMDLINE_BAREBONES
#ifndef DUK_CMDLINE_FANCY
#define NO_READLINE
#define NO_RLIMIT
#define NO_SIGNAL

Loading…
Cancel
Save