diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-09 07:29:42 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-09 07:29:42 +0000 |
commit | 2ff1f9b803f8b8b207c1186c94b6eabd5f9c6865 (patch) | |
tree | 2a0bfa9ff020e83ee1bd3e2657b10ed841daaefc /Makefile | |
parent | 34905ea59644683368f5f16813c8f450fcd69d86 (diff) | |
download | mandoc-2ff1f9b803f8b8b207c1186c94b6eabd5f9c6865.tar.gz |
Integrate the makewhatis binary into the mandoc binary
just like we do it on OpenBSD. Smaller and neater.
While here, let ./configure set INSTALL_TARGETS.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 11 insertions, 18 deletions
@@ -207,18 +207,19 @@ MANDOC_TERM_OBJS = eqn_term.o \ term_ps.o \ tbl_term.o -MANDOC_OBJS = $(MANDOC_HTML_OBJS) \ +BASE_OBJS = $(MANDOC_HTML_OBJS) \ $(MANDOC_MAN_OBJS) \ $(MANDOC_TERM_OBJS) \ main.o \ out.o \ tree.o -MAN_OBJS = $(MANDOC_OBJS) +MAIN_OBJS = $(BASE_OBJS) -MAKEWHATIS_OBJS = mandocdb.o mansearch_const.o manpath.o - -APROPOS_OBJS = mansearch.o mansearch_const.o manpath.o +DB_OBJS = mandocdb.o \ + mansearch.o \ + mansearch_const.o \ + manpath.o CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ @@ -265,16 +266,12 @@ WWW_OBJS = mdocml.tar.gz \ include Makefile.local -INSTALL_TARGETS = $(BUILD_TARGETS:-build=-install) - # === DEPENDENCY HANDLING ============================================== all: base-build $(BUILD_TARGETS) Makefile.local base-build: mandoc demandoc -db-build: makewhatis - cgi-build: man.cgi install: base-install $(INSTALL_TARGETS) @@ -295,8 +292,7 @@ distclean: clean clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) - rm -f mandoc $(MANDOC_OBJS) $(APROPOS_OBJS) - rm -f makewhatis $(MAKEWHATIS_OBJS) + rm -f mandoc $(BASE_OBJS) $(DB_OBJS) rm -f man.cgi $(CGI_OBJS) rm -f manpage $(MANPAGE_OBJS) rm -f demandoc $(DEMANDOC_OBJS) @@ -322,7 +318,7 @@ base-install: base-build $(DESTDIR)$(MANDIR)/man7 $(INSTALL_DATA) example.style.css $(DESTDIR)$(EXAMPLEDIR) -db-install: db-build +db-install: base-build mkdir -p $(DESTDIR)$(BINDIR) mkdir -p $(DESTDIR)$(SBINDIR) mkdir -p $(DESTDIR)$(MANDIR)/man1 @@ -332,7 +328,7 @@ db-install: db-build ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/apropos ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/man ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(BINDIR)/whatis - $(INSTALL_PROGRAM) makewhatis $(DESTDIR)$(SBINDIR) + ln -f $(DESTDIR)$(BINDIR)/mandoc $(DESTDIR)$(SBINDIR)/makewhatis $(INSTALL_MAN) apropos.1 man.1 $(DESTDIR)$(MANDIR)/man1 ln -f $(DESTDIR)$(MANDIR)/man1/apropos.1 \ $(DESTDIR)$(MANDIR)/man1/whatis.1 @@ -358,11 +354,8 @@ Makefile.local config.h: configure ${TESTSRCS} libmandoc.a: $(COMPAT_OBJS) $(LIBMANDOC_OBJS) $(AR) rs $@ $(COMPAT_OBJS) $(LIBMANDOC_OBJS) -mandoc: $(MAN_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MAN_OBJS) libmandoc.a $(DBLIB) - -makewhatis: $(MAKEWHATIS_OBJS) libmandoc.a - $(CC) $(LDFLAGS) -o $@ $(MAKEWHATIS_OBJS) libmandoc.a $(DBLIB) +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) $(LDFLAGS) -o $@ $(MAIN_OBJS) libmandoc.a $(DBLIB) manpage: $(MANPAGE_OBJS) libmandoc.a $(CC) $(LDFLAGS) -o $@ $(MANPAGE_OBJS) libmandoc.a $(DBLIB) |