#
VERSION = 1.3.2
-GNUSHOGIDIR = ./gnushogi
-XSHOGIDIR = ./xshogi
+ROOT = @top_srcdir@
+BUILDROOT = @top_builddir@
+GNUSHOGIDIR = $(BUILDROOT)/gnushogi
+XSHOGIDIR = $(BUILDROOT)/xshogi
#
# Default targets.
#
gnushogi_compile:
- -cd $(GNUSHOGIDIR); $(MAKE) gnushogi
+ -cd $(GNUSHOGIDIR) && $(MAKE) gnushogi
pat2inc:
- -cd $(GNUSHOGIDIR); $(MAKE) pat2inc
+ -cd $(GNUSHOGIDIR) && $(MAKE) pat2inc
sizetest:
- -cd $(GNUSHOGIDIR); $(MAKE) sizetest
+ -cd $(GNUSHOGIDIR) && $(MAKE) sizetest
xshogi_compile:
- -cd $(XSHOGIDIR); $(MAKE)
+ -cd $(XSHOGIDIR) && $(MAKE)
gnushogi.bbk:
- -cd $(GNUSHOGIDIR); $(MAKE) gnushogi.bbk
+ -cd $(GNUSHOGIDIR) && $(MAKE) gnushogi.bbk
#
install: gnushogi_install @XSHOGIINSTALL@
gnushogi_install:
- -cd $(GNUSHOGIDIR); $(MAKE) install
+ -cd $(GNUSHOGIDIR) && $(MAKE) install
xshogi_install: $(XSHOGIDIR)/xshogi
- -cd $(XSHOGIDIR); $(MAKE) install
+ -cd $(XSHOGIDIR) && $(MAKE) install
clean: gnushogi_clean @XSHOGICLEAN@ doc_clean
gnushogi_clean:
- cd $(GNUSHOGIDIR); $(MAKE) clean
+ cd $(GNUSHOGIDIR) && $(MAKE) clean
xshogi_clean:
- cd $(XSHOGIDIR); $(MAKE) clean
+ cd $(XSHOGIDIR) && $(MAKE) clean
doc_clean:
- cd doc; $(MAKE) clean
+ cd $(BUILDROOT)/doc && $(MAKE) clean
#
$(MAKE) maintainerclean
rm -rf $(DISTNAME)
mkdir $(DISTNAME)
- tar -cf - --exclude .git . | (cd $(DISTNAME) && tar -xf -)
- cd $(DISTNAME) && ./autogen.sh && ./configure
+ tar -cf - --exclude .git $(ROOT) | (cd $(DISTNAME) && tar -xf -)
+ cd $(DISTNAME) && $(ROOT)/autogen.sh && $(ROOT)/configure
cd $(DISTNAME)/doc && $(MAKE) info
cd $(DISTNAME) && make distclean
tar -zcf $(DISTNAME).tar.gz $(DISTNAME)
distclean: clean
rm -rf $(DISTCLEANFILES)
- cd doc; $(MAKE) distclean
+ cd $(BUILDROOT)/doc && $(MAKE) distclean
#
# Extra cleanup, for the maintainer only.
maintainerclean: distclean
rm -f $(MAINTAINERCLEANFILES)
- cd doc; $(MAKE) maintainerclean
+ cd $(BUILDROOT)/doc && $(MAKE) maintainerclean
CLEANFILES = *.log *.dvi *.aux *.dlog \
*.cp *.cps *.fn *.ky *.pg *.toc *.tp *.vr
+SRCDIR = @srcdir@
info:
- makeinfo gnushogi.texinfo
+ makeinfo $(SRCDIR)/gnushogi.texinfo
dvi:
- texi2dvi gnushogi.texinfo
+ texi2dvi $(SRCDIR)/gnushogi.texinfo
pdf:
- texi2pdf gnushogi.texinfo
+ texi2pdf $(SRCDIR)/gnushogi.texinfo
# I do some egregious hacks to get around limitations of
# texi2html.
html:
- texi2html -split_node gnushogi.texinfo
+ texi2html -split_node $(SRCDIR)/gnushogi.texinfo
ps: dvi
dvips -t letter gnushogi.dvi -o gnushogi.ps
dvi2ps gnushogi.dvi > gnushogi.ps
spell:
- tr '[A-Z]' '[a-z]' < gnushogi.texinfo | tr -cd '[A-Za-z0-9_ \012]' | \
+ tr '[A-Z]' '[a-z]' < $(SRCDIR)/gnushogi.texinfo | tr -cd '[A-Za-z0-9_ \012]' | \
tr -s '[ ]' '\012' | sort | uniq -c | sort -nr | spell | sort | uniq
clean: