X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/blobdiff_plain/e5cd393faa334825e69833ba2996cbcac9f2957d..9ec43d08822d51ee7aa4f63a949d355d488f5846:/Makefile diff --git a/Makefile b/Makefile index 719e9b4..8ca052a 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,11 @@ # - the Makefile uses GNU ifdef / ifndef commands and GNU make `%' # pattern rules +prefix=/usr/local +exec_prefix=$(prefix) +bindir=$(exec_prefix)/bin +INSTALL=install -c + ifdef RELEASE ifndef VERSION VERSION := $(RELEASE) @@ -35,9 +40,9 @@ BUILDDIR := build endif endif -all: +all install: @test -d $(BUILDDIR) || mkdir $(BUILDDIR) - @make -C $(BUILDDIR) -f ../Makefile REALBUILD=yes + @make -C $(BUILDDIR) -f ../Makefile $@ REALBUILD=yes spotless: topclean @test -d $(BUILDDIR) || mkdir $(BUILDDIR) @@ -96,7 +101,7 @@ else VDEF = `(cd $(SRC); md5sum -c manifest && cat version)` endif -halibut: +all: halibut SRC := ../ @@ -110,7 +115,7 @@ include $(LIBCHARSET_SRCDIR)Makefile MODULES := main malloc ustring error help licence version misc tree234 MODULES += input keywords contents index style biblio -MODULES += bk_text bk_xhtml bk_whlp bk_man bk_info bk_paper bk_ps bk_pdf +MODULES += bk_text bk_html bk_whlp bk_man bk_info bk_paper bk_ps bk_pdf MODULES += winhelp psdata wcwidth OBJECTS := $(addsuffix .o,$(MODULES)) $(LIBCHARSET_OBJS) @@ -131,6 +136,10 @@ spotless:: clean clean:: rm -f *.o halibut core +install: + $(INSTALL) -m 755 halibut $(bindir)/halibut + $(MAKE) -C ../doc install prefix="$(prefix)" INSTALL="$(INSTALL)" + FORCE: # phony target to force version.o to be rebuilt every time -include $(DEPS)