summaryrefslogtreecommitdiff
path: root/dviware/mdvi/Makefile.in
blob: e86ce15413fd4886dfcab4eefdfa87b8abac53c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

srcdir = @srcdir@
VPATH  = @srcdir@

include ./config.mk

distdir = $(PACKAGE)-$(VERSION)
ALL_FRONTENDS = @ALL_FRONTENDS@

FRONTENDS = @FRONTENDS@
SUBDIRS = @INTLSUB@ support lib $(FRONTENDS)
MDVIMAPDIR = @MDVIMAPDIR@
MKTEXLSR = @MKTEXLSR@
POST_INSTALL = @POST_INSTALL@
POST_UNINSTALL = $(POST_INSTALL)

OTHERFILES = README TODO COPYING LICENSE NOTES BUGS \
	ABOUT-NLS WARNING Changes

ACFILES    = Makefile.in configure.in config.h.in version.h.in \
	configure config

DISTFILES = $(ACFILES) $(OTHERFILES) mdvi.conf data
DISTDIRS  = $(ALL_FRONTENDS) support lib intl

.PHONY: all $(SUBDIRS) $(ALL_FRONTENDS)
all: $(SUBDIRS)

$(SUBDIRS):
	if test -d "$@"; then $(MAKE) -C $@; else :; fi
$(ALL_FRONTENDS): @INTLSUB@ support lib

.PHONY: _dummy
_dummy $(INTLDEPS):
	$(MAKE) -C intl all

.PHONY: install-data install-bin install-recurse install
install: all install-data install-bin install-recurse
	$(POST_INSTALL)
install-bin:
install-data:
	$(MKINSTALLDIRS) $(MDVIMAPDIR)
	$(INSTALL_DATA) $(srcdir)/mdvi.conf $(MDVIMAPDIR)/mdvi.conf
	@cd $(srcdir)/data; for i in *; do \
	  echo "$(INSTALL_DATA) $$i $(MDVIMAPDIR)/$$i"; \
	  $(INSTALL_DATA) $$i $(MDVIMAPDIR)/$$i; \
	done	
install-recurse:
	@list="$(SUBDIRS)"; for i in $$list; do \
	  if test -d "$$i"; then $(MAKE) -C $$i install; else :; fi; \
	done

.PHONY: uninstall uninstall-data uninstall-bin uninstall-recurse uninstall
uninstall: uninstall-recurse uninstall-bin uninstall-data
	$(POST_UNINSTALL)
uninstall-bin:
uninstall-data:
	@cd data; for i in *; do \
	  $(RM) $(MDVIMAPDIR)/$$i; \
	done
	$(RM) $(MDVIMAPDIR)/mdvi.conf
	-rmdir $(MDVIMAPDIR)
uninstall-recurse:
	@list="$(SUBDIRS)"; for i in $$list; do \
	  if test -d "$$i"; then $(MAKE) -C $$i uninstall; else :; fi; \
	done

.PHONY: dist
dist: distdir $(distdir)/MD5SUMS
	@echo "Creating tarball $(distdir).tar.gz..."
	$(TAR) zcfoh $(distdir).tar.gz $(distdir) || exit 1
	cp $(distdir)/MD5SUMS $(distdir).sum
	rm -rf $(distdir)

# Creates a tarball, unpacks it, configures it, builds it in a VPATH
# configuration, installs it, and cleans up if everything went well.
# Otherwise, the output generated when building is saevd in the file
# distcheck.log for post-mortem examination.
#
CONFOPTS = \
	--with-type1-fonts \
	--with-truetype-fonts \
	--with-freetype-headers=/usr/local/include/freetype1

.PHONY: distcheck
distcheck: dist
	@echo "Checking $(distdir).tar.gz for completeness"
	$(TAR) zxf $(distdir).tar.gz || exit 1
	-@top=`pwd`; rm -rf distcheck; mkdir distcheck; \
	cd distcheck; inst=`pwd`/INSTALL=; mkdir BUILD=; cd BUILD=; \
	rm -f $$top/distcheck.log; \
	echo "Testing distribution (building output saved in \`distcheck.log')"; \
	echo "running ../../$(distdir)/configure $(CONFOPTS) \
	--prefix=$$inst" --with-texmf="$$inst/texmf"; \
	../../$(distdir)/configure $(CONFOPTS) \
	  --prefix=$$inst --with-texmf="$$inst/texmf" \
	>>$$top/distcheck.log 2>&1 || exit 1; \
	echo "running $(MAKE) all"; \
	$(MAKE) all >>$$top/distcheck.log 2>&1 || exit 1; \
	echo "running $(MAKE) install"; \
	$(MAKE) install >>$$top/distcheck.log 2>&1 || exit 1; \
	cd .. && echo success > SUCCESS
	@if test -f distcheck/SUCCESS; then \
	  echo "$(distdir) ready for distribution"; \
	else \
	  echo "$(distdir) does not build and install yet -- check log"; \
	fi
	rm -rf distcheck $(distdir)

.PHONY: snapshot
snapshot:
	$(MAKE) distdir=$(PACKAGE)-`date +"%Y%m%d"` dist

include $(FRAGDIR)/dist.mk

CLEANABLE += core
DISTCLEANABLE += config.mk nls.mk config.log config.cache \
	config.status config.h version.h Makefile

include $(FRAGDIR)/targets.mk