summaryrefslogtreecommitdiff
path: root/Makefile.comm
diff options
context:
space:
mode:
authorwlemb <wlemb>2004-06-01 10:46:50 +0000
committerwlemb <wlemb>2004-06-01 10:46:50 +0000
commit31881a0d1d9877916e024f4f228270776ad7d4b5 (patch)
treef72411bc994ea90476116907a5b4ba0001d73bfe /Makefile.comm
parent359c8a20b11b78a465e7851330c6eed1d2c74e87 (diff)
downloadgroff-31881a0d1d9877916e024f4f228270776ad7d4b5.tar.gz
Integrate gxditview into groff's standard directory hierarchy.
* src/xditview/*: Moved to ... * src/devices/xditview/*: Here. Moved DviChar.h and XFontName.h to src/include. Moved DviChar.c and XFontName.c to new directory src/libs/libxutil. Split off `xmalloc' into new file src/libs/libxutil/xmalloc.c. Moved xtotroff.c to new directory src/utils/xtotroff. Provide proper Makefile.sub files (reusing the stuff from Imakefile.in). DESC renamed to DESC.in. Removed GXDitview-ad.h, INSTALL, Imakefile.in. Converted everything from K&R to ANSI C. Decorated with const where appropriate. Cast string constants with `String' and `char *' where appropriate. Made it compile with C++ (used as a C compiler). Removed other minor compiler warnings. * src/devices/xditview/device.c: Include config.h, string.h, and defs.h. Don't declare `exit', `strtok', `strchr', and `getenv'. (FONTPATH): Remove. * src/devices/xditview/font.c: Don't declare `XParseFontName' and `XFormatFontName'. * src/devices/xditview/xditview.c: Include config.h. Include stdio.h earlier. Protect declaration of `popen' and `pclose' with NEED_DECLARATION_POPEN and NEED_DECLARATION_PCLOSE. Replace `caddr_t' with `XtPointer'. (MakePromptFunc): New typedef. (DoPrint): Use RETSIGTYPE. (promptfunction): Change type to MakePromptFunc. (MakePrompt): Use MakePromptFunc for third argument. (xmalloc): Removed. * src/devices/xditview/ad2c: Add casts to `String'. * src/include/XFontName.h (XFontNameString): Don't use array notation. Add prototypes for `XParseFontName', `XFormatFontName', `XCompareFontName', and `XCopyFontName'. * src/include/Makefile.sub (HDRS): Add `DviChar.h' and `XFontName.h'. * src/utils/xtotroff/xtotroff.c: Include getopt.h. Don't declare `XParseFontName' and `XFormatFontName'. (xmalloc): Removed. (main): Remove `optind' and `optarg'. * Makefile.in (XDEVDIRS, XPROGDIRS, XLIBDIRS): New variables (to select programs which need X). Make XDEVIDIRS depend on `FORCE'. (X_CFLAGS, X_LIBS, X_EXTRA_LIBS, X_PRE_LIBS): New variables (for X support). (MDEFINES): Updated. (LIBDIRS): Use XLIBDIRS. (CPROGDIRS): Use XPROGDIRS. (DEVDIRS): Remove font directories for gxditview. (ALLDIRS, DISTDIRS): Add XDEVDIRS. (EXTRADIRS): Remove src/xditview. * Makefile.sub (DISCLEANFILES): Updated. * Makefile.comm (LIBXUTIL): New variable. (.cpp.o, .cpp.obj): Handle EXTRA_CCFLAGS. (.c.o, .c.obj, .y.o): Handle EXTRA_CFLAGS. * Makefile.cpg, Makefile.ccpg ($PROG): Handle EXTRA_LDFLAGS. * aclocal.m4 (GROFF_X11): New function. * configure.ac: Call GROFF_X11. Don't create src/xditview/Imakefile. Don't emit notice how to build gxditview. * configure: Regenerated. * test-groff.in (GROFF_BIN_PATH, XENVIRONMENT): Updated.
Diffstat (limited to 'Makefile.comm')
-rw-r--r--Makefile.comm11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile.comm b/Makefile.comm
index 0efef389..5ecd73d8 100644
--- a/Makefile.comm
+++ b/Makefile.comm
@@ -30,6 +30,7 @@ LINK.c=$(CC) $(CFLAGS) $(LDFLAGS)
LIBGROFF=$(top_builddir)/src/libs/libgroff/libgroff.$(LIBEXT)
LIBBIB=$(top_builddir)/src/libs/libbib/libbib.$(LIBEXT)
LIBDRIVER=$(top_builddir)/src/libs/libdriver/libdriver.$(LIBEXT)
+LIBXUTIL=$(top_builddir)/src/libs/libxutil/libxutil.$(LIBEXT)
MLIB=
XLIBS=
YTABH=
@@ -98,16 +99,16 @@ extraclean: distclean
.SUFFIXES: .o .obj .cpp .c .y .man .n
.cpp.o:
- $(COMPILE.cpp) $<
+ $(COMPILE.cpp) $(EXTRA_CCFLAGS) $<
.c.o:
- $(COMPILE.c) $<
+ $(COMPILE.c) $(EXTRA_CFLAGS) $<
.cpp.obj:
- $(COMPILE.cpp) $<
+ $(COMPILE.cpp) $(EXTRA_CCFLAGS) $<
.c.obj:
- $(COMPILE.c) $<
+ $(COMPILE.c) $(EXTRA_CFLAGS) $<
.y.cpp:
if test -n "$(YTABH)"; then \
@@ -132,7 +133,7 @@ extraclean: distclean
-test -f y.tab.c && mv y.tab.c y_tab.c
mv y_tab.c $(YTABC)
test -z "$(YTABH)" || mv y_tab.h $(YTABH)
- $(COMPILE.cpp) $(YTABC)
+ $(COMPILE.cpp) $(EXTRA_CCFLAGS) $(YTABC)
.man.n:
@echo Making $@ from $<