Demonstration of groff .psbb request handling code, for EPS and PDF input files
Revisión | 72ebbc3a28d810a12d685bfa2d00b6a56d882127 (tree) |
---|---|
Tiempo | 2021-10-20 05:52:07 |
Autor | ![]() |
Commiter | Keith Marshall |
Simplify building with debugging diagnostics enabled.
* psbblex.l [DEBUG || DEBUGGING || EBUG || EBUGGING]: Accept...
[-D DEBUG, -D DEBUGGING, -DEBUG, -DEBUGGING]: ...as equivalents, when
specified as compile-time options.
* GNUmakefile (all): Remove dependency on...
(state.map): ...build of this, but preserve it within...
(all-debug): ...this new target; it reproduces original "all", and...
(CPPFLAGS) [-DEBUG]: ...adds this compile-time option.
@@ -21,7 +21,9 @@ | ||
21 | 21 | # You should have received a copy of the GNU General Public License |
22 | 22 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
23 | 23 | # |
24 | -all: psbb state.map | |
24 | +all: psbb | |
25 | +all-debug: psbb state.map | |
26 | +all-debug: CPPFLAGS += -DEBUG | |
25 | 27 | |
26 | 28 | srcdir = . |
27 | 29 | vpath %.l ${srcdir} |
@@ -32,7 +32,11 @@ | ||
32 | 32 | #include "psbb.h" |
33 | 33 | #include "psbb.tab.h" |
34 | 34 | |
35 | -#if DEBUGGING | |
35 | +#if DEBUG || DEBUGGING || EBUG || EBUGGING | |
36 | + /* Enable tracing diagnostics, when compiled with the "-D DEBUG" option; | |
37 | + * (accept "-D DEBUGGING", "-DEBUG", or "-DEBUGGING" as equivalent). | |
38 | + */ | |
39 | +# undef DEBUG | |
36 | 40 | # define DEBUG(FOO) FOO |
37 | 41 | # define DEBUG_ECHO debug_msg( "%d: %s\n", YYSTATE, yytext ) |
38 | 42 |
@@ -61,6 +65,10 @@ static void debug_msg (const char *fmt, ...) | ||
61 | 65 | { va_list av; va_start(av, fmt); vfprintf(stderr, fmt, av); va_end(av); } |
62 | 66 | |
63 | 67 | #else |
68 | + /* No "-D DEBUG" (or equivalent) option specified; we will still use the | |
69 | + * debugging macros, but we define them without tracing diagnostics. | |
70 | + */ | |
71 | +# undef DEBUG | |
64 | 72 | # define DEBUG(FOO) |
65 | 73 | # define DEBUG_ECHO |
66 | 74 | # define DEBUG_MSG(ARGLIST) |