File: Makefile

package info (click to toggle)
latex-make 2.1.18-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 464 kB
  • sloc: makefile: 215; sh: 54
file content (49 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download
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
ifeq ($(filter else-if,$(.FEATURES)),)
$(error GNU Make 3.81 or latter needed. Please, update your software.)
	exit 1
endif

.PHONY: all install clean distclean dist ctan

PKGNAME=latex-make

all:
	$(MAKE) -C src doc

check: all
	$(MAKE) -C examples

install: all
	$(MAKE) -C src $@

clean distclean:
	-$(MAKE) -C examples $@
	-$(MAKE) -C MacOSX $@
	-$(MAKE) -C ctan $@
	$(MAKE) -C src $@

VERSION=$(shell cat VERSION)

dist:
	if [ -d .svn ]; then \
		$(MAKE) dist-svn; \
	elif [ -d .git ]; then \
		$(MAKE) dist-git; \
	else \
		echo "No way to build dist without SCM"; \
		exit 1; \
	fi
	$(MAKE) dist-ctan

dist-svn:
	if [ "$$(svn st)" != "" ] ;then svn st ; exit 1 ; fi
	svn export . $(PKGNAME)-$(VERSION)
	tar cvzf $(PKGNAME)-$(VERSION).tar.gz $(PKGNAME)-$(VERSION)
	rm -rf $(PKGNAME)-$(VERSION)

dist-git:
	if ! git status | grep -sq '^nothing to commit' ; then git status ; exit 1 ; fi
	git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ HEAD | gzip -9 > $(PKGNAME)-$(VERSION).tar.gz

dist-ctan:
	$(MAKE) -C ctan