summaryrefslogtreecommitdiffstats
path: root/contrib/groff/Makefile.comm
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/groff/Makefile.comm')
-rw-r--r--contrib/groff/Makefile.comm43
1 files changed, 28 insertions, 15 deletions
diff --git a/contrib/groff/Makefile.comm b/contrib/groff/Makefile.comm
index 6d246c5..fd27b8e 100644
--- a/contrib/groff/Makefile.comm
+++ b/contrib/groff/Makefile.comm
@@ -23,14 +23,14 @@ SHELL=/bin/sh
INCLUDES=-I. -I$(srcdir) \
-I$(top_builddir)/src/include -I$(top_srcdir)/src/include
ALL_CCFLAGS=$(INCLUDES) $(CCDEFINES) $(CCFLAGS) $(CPPFLAGS)
-COMPILE.cc=$(CCC) $(ALL_CCFLAGS) -c
+COMPILE.cpp=$(CCC) $(ALL_CCFLAGS) -c
ALL_CFLAGS=$(INCLUDES) $(CDEFINES) $(CFLAGS) $(CPPFLAGS)
COMPILE.c=$(CC) $(ALL_CFLAGS) -c
-LINK.cc=$(CCC) $(CCFLAGS) $(LDFLAGS)
+LINK.cpp=$(CCC) $(CCFLAGS) $(LDFLAGS)
LINK.c=$(CC) $(CFLAGS) $(LDFLAGS)
-LIBGROFF=$(top_builddir)/src/libs/libgroff/libgroff.a
-LIBBIB=$(top_builddir)/src/libs/libbib/libbib.a
-LIBDRIVER=$(top_builddir)/src/libs/libdriver/libdriver.a
+LIBGROFF=$(top_builddir)/src/libs/libgroff/libgroff.$(LIBEXT)
+LIBBIB=$(top_builddir)/src/libs/libbib/libbib.$(LIBEXT)
+LIBDRIVER=$(top_builddir)/src/libs/libdriver/libdriver.$(LIBEXT)
MLIB=
XLIBS=
YTABH=
@@ -96,21 +96,21 @@ extraclean: distclean
-rm -f \#* *~ =* core junk grot old temp tmp tem
.SUFFIXES:
-.SUFFIXES: .o .obj .cc .c .y .man .n
+.SUFFIXES: .o .obj .cpp .c .y .man .n
-.cc.o:
- $(COMPILE.cc) $<
+.cpp.o:
+ $(COMPILE.cpp) $<
.c.o:
$(COMPILE.c) $<
-.cc.obj:
- $(COMPILE.cc) $<
+.cpp.obj:
+ $(COMPILE.cpp) $<
.c.obj:
$(COMPILE.c) $<
-.y.cc:
+.y.cpp:
if test -n "$(YTABH)"; then \
$(YACC) $(YACCFLAGS) -d $<; \
else \
@@ -122,7 +122,7 @@ extraclean: distclean
if test -n "$(YTABH)"; then mv y_tab.h $(YTABH); fi
# The next rule is needed for make of Solaris 2.5.1 to override its
-# built-in .y.o rule (which takes precedence over the .y.cc rule above).
+# built-in .y.o rule (which takes precedence over the .y.cpp rule above).
.y.o:
if test -n "$(YTABH)"; then \
$(YACC) $(YACCFLAGS) -d $<; \
@@ -133,7 +133,7 @@ extraclean: distclean
-test -f y.tab.c && mv y.tab.c y_tab.c
mv y_tab.c $(YTABC)
if test -n "$(YTABH)"; then mv y_tab.h $(YTABH); fi
- $(COMPILE.cc) $(YTABC)
+ $(COMPILE.cpp) $(YTABC)
.man.n:
@echo Making $@ from $<
@@ -246,10 +246,18 @@ install_dev:
$(INSTALL_DATA) $(srcdir)/$$f $(fontsubdir)/$$f; \
fi; \
done
+ -for f in $(DEVSCRIPTS); do \
+ rm -f $(fontsubdir)/$$f; \
+ if test -f $$f; then \
+ $(INSTALL_SCRIPT) $$f $(fontsubdir)/$$f; \
+ else \
+ $(INSTALL_SCRIPT) $(srcdir)/$$f $(fontsubdir)/$$f; \
+ fi; \
+ done
.PHONY: uninstall_dev
uninstall_dev:
- -for f in $(DEVFILES); do rm -f $(fontsubdir)/$$f; done
+ -for f in $(DEVFILES) $(DEVSCRIPTS); do rm -f $(fontsubdir)/$$f; done
-if test -d $(fontsubdir)/generate; then \
rmdir $(fontsubdir)/generate; \
fi
@@ -261,8 +269,13 @@ depend_src: depend.temp
depend.temp: FORCE
> depend.temp;
+ if test -f "$(srcdir)/$(YTABC)"; then \
+ ytabc="$(srcdir)/$(YTABC)"; \
+ else \
+ ytabc="$(YTABC)"; \
+ fi; \
test -z "$(CCSRCS)$(YTABC)" \
- || $(CCC) $(ALL_CCFLAGS) -MM $(CCSRCS) $(YTABC) >>depend.temp
+ || $(CCC) $(ALL_CCFLAGS) -MM $(CCSRCS) $$ytabc >>depend.temp
test -z "$(CSRCS)" \
|| $(CC) $(ALL_CFLAGS) -MM $(CSRCS) >>depend.temp
if test -n "$(YTABH)"; then \
OpenPOWER on IntegriCloud