Demonstration of groff .psbb request handling code, for EPS and PDF input files
修訂 | e975dbad116e460acb9e5fbaa842bc62621b09c9 (tree) |
---|---|
時間 | 2017-10-16 02:49:02 |
作者 | Keith Marshall <keith@user...> |
Commiter | Keith Marshall |
Add support for out-of-source builds.
* GNUmakefile (srcdir): Define it; default is "."
(vpath) [%.l, %.y]: Locate them, by reference to $srcdir
(vpath) [%.c, %.cpp, %.h]: Locate them in $srcdir, or $srcdir/libgroff
(CPPFLAGS): Incrementally add $srcdir and $srcdir/libgroff includes.
(CFLAGS, CXXFLAGS): Remove include path specifications.
@@ -23,16 +23,23 @@ | ||
23 | 23 | # |
24 | 24 | psbb: |
25 | 25 | |
26 | +srcdir = . | |
27 | +vpath %.l ${srcdir} | |
28 | +vpath %.y ${srcdir} | |
29 | + | |
26 | 30 | # For convenience, we've placed a necessary subset of libgroff sources |
27 | 31 | # and headers in our local libgroff subdirectory; ensure that make, and |
28 | 32 | # the C/C++ compilers can see them. |
29 | 33 | # |
30 | -vpath %.c ./libgroff | |
31 | -vpath %.cpp ./libgroff | |
32 | -vpath %.h ./libgroff | |
34 | +vpath %.c ${srcdir} ${srcdir}/libgroff | |
35 | +vpath %.cpp ${srcdir} ${srcdir}/libgroff | |
36 | +vpath %.h ${srcdir} ${srcdir}/libgroff | |
37 | + | |
38 | +CFLAGS = -g -O2 | |
39 | +CXXFLAGS = -g -O2 | |
40 | + | |
41 | +CPPFLAGS += -I ${srcdir} -I ${srcdir}/libgroff | |
33 | 42 | |
34 | -CFLAGS = -g -O2 -I./libgroff | |
35 | -CXXFLAGS = -g -O2 -I./libgroff | |
36 | 43 | |
37 | 44 | # GNU make's default $(YACC) rule doesn't satisfy the dependencies we |
38 | 45 | # would like, so we specify our own alternative rule. |
@@ -53,6 +60,7 @@ libgroff.a: error.o errarg.o itoa.o fatal.o | ||
53 | 60 | psbb: t-psbb.o psbblex.o psbb.tab.o libgroff.a |
54 | 61 | $(CXX) $(LDFLAGS) $(TARGET_ARCH) $^ -o $@ |
55 | 62 | |
63 | + | |
56 | 64 | # Object file dependencies: GCC could generate these automatically, but |
57 | 65 | # this is simpler, in this trivial instance. |
58 | 66 | # |