./configure
-For more complicated cases, LyX configure takes the following specific
+For more complicated cases, LyX configure honors the following specific
flags:
o --enable-build-type=[rel(ease), dev(elopment), pre(release)]
allows to tweak the compiled code. The following table describes
the settings in terms of various options that are described later
- release prerelease development
- optimization -O2 -O2 -O
+ release prerelease development gprof
+ optimization -O2 -O2 -O -O2
assertions X X
stdlib-debug X
concept-checks X X
warnings X X
- debug X X
+ debug X X X
+ gprof X
The default are as follows in terms of version number
release: stable release (1.x.y)
build_type=development;;
pre*) lyx_prerelease=yes
build_type=prerelease;;
+ gp*) lyx_profiling=yes
+ build_type=gprof;;
rel*) ;;
*) AC_ERROR([Bad build type specification \"$enableval\". Please use one of dev(elopment), rel(ease) or pre(release)]);;
esac],
### We might want to disable debug
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[enable debug information]),,
- [ if test $lyx_devel_version = yes -o $lyx_prerelease = yes ; then
+ [ if test $lyx_devel_version = yes -o $lyx_prerelease = yes -o $lyx_profiling = yes ; then
enable_debug=yes;
else
enable_debug=no;
AC_ARG_ENABLE(gprof,
AC_HELP_STRING([--enable-gprof],[enable profiling using gprof]),,
- enable_gprof=no;)
+ [if test $build_type = gprof ; then
+ enable_gprof=yes;
+ else
+ enable_gprof=no;
+ fi;])
### set up optimization
AC_ARG_ENABLE(optimization,
return lines;
}
+namespace {
+
+// output the proper paragraph start according to latextype.
+void parStartCommand(Paragraph const & par, odocstream & os, TexRow & texrow,
+ OutputParams const & runparams,Layout const & style)
+{
+ switch (style.latextype) {
+ case LATEX_COMMAND:
+ os << '\\' << from_ascii(style.latexname());
+
+ // Separate handling of optional argument inset.
+ if (style.optargs != 0 || style.reqargs != 0) {
+ int ret = latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
+ while (ret > 0) {
+ texrow.newline();
+ --ret;
+ }
+ }
+ else
+ os << from_ascii(style.latexparam());
+ break;
+ case LATEX_ITEM_ENVIRONMENT:
+ case LATEX_LIST_ENVIRONMENT:
+ os << "\\item ";
+ break;
+ case LATEX_BIB_ENVIRONMENT:
+ // ignore this, the inset will write itself
+ break;
+ default:
+ break;
+ }
+}
+
+} // namespace anon
// FIXME: this should be anonymous
void TeXOnePar(Buffer const & buf,
if (style.pass_thru) {
Font const outerfont = text.outerFont(pit);
- // can we have pass_thru for lists? if so, we need to do the whole
- // switch and kaboodle here.
- os << '\\' << from_ascii(style.latexname());
+ parStartCommand(par, os, texrow,runparams, style);
- // Separate handling of optional argument inset.
- if (style.optargs != 0 || style.reqargs != 0) {
- int ret = latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
- while (ret > 0) {
- texrow.newline();
- --ret;
- }
- }
- else
- os << from_ascii(style.latexparam());
par.latex(bparams, outerfont, os, texrow, runparams, start_pos,
end_pos);
- os << from_ascii("}\n");
+
+ // I did not create a parEndCommand for this minuscule
+ // task because in the other user of parStartCommand
+ // the code is different (JMarc)
+ if (style.isCommand())
+ os << from_ascii("}\n");
+ else
+ os << from_ascii("\n");
texrow.newline();
if (!style.parbreak_is_newline) {
os << '\n';
}
}
- switch (style.latextype) {
- case LATEX_COMMAND:
- os << '\\' << from_ascii(style.latexname());
-
- // Separate handling of optional argument inset.
- if (style.optargs != 0 || style.reqargs != 0) {
- int ret = latexArgInsets(par, os, runparams, style.reqargs, style.optargs);
- while (ret > 0) {
- texrow.newline();
- --ret;
- }
- }
- else
- os << from_ascii(style.latexparam());
- break;
- case LATEX_ITEM_ENVIRONMENT:
- case LATEX_LIST_ENVIRONMENT:
- os << "\\item ";
- break;
- case LATEX_BIB_ENVIRONMENT:
- // ignore this, the inset will write itself
- break;
- default:
- break;
- }
+ parStartCommand(par, os, texrow,runparams, style);
Font const outerfont = text.outerFont(pit);