File: Makefile

package info (click to toggle)
synopsis 0.12-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 38,112 kB
  • ctags: 18,122
  • sloc: ansic: 41,842; cpp: 39,920; xml: 17,704; python: 13,545; sh: 10,045; yacc: 1,271; makefile: 1,242; lex: 684; asm: 361
file content (62 lines) | stat: -rw-r--r-- 1,288 bytes parent folder | download | duplicates (6)
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
#
# Copyright (C) 2004 Stefan Seefeld
# All rights reserved.
# Licensed to the public under the terms of the GNU LGPL (>= 2),
# see the file COPYING for details.
#

SHELL	:= /bin/sh

prefix	:=

subdirs	:= $(filter-out Paths/src, $(wildcard Paths/*))
subdirs += COS
subdirs += hybrid
subdirs += math

action	:= all

.PHONY: all $(subdirs)

all:	$(subdirs)

$(subdirs):
	@echo making $(action) in $@
	$(MAKE) -k -C $@ $(action) prefix=$(prefix)/$@

install-html:
ifdef prefix
	mkdir -p $(prefix)
	cp index.html $(prefix)
endif
	$(MAKE) action="install-html" prefix=$(prefix)

install-print:
ifdef prefix
	mkdir -p $(prefix)
endif
	$(MAKE) action="install-print" prefix=$(prefix)

clean:
	$(MAKE) action="clean"

distclean:
	$(MAKE) action="distclean"

install-src:
ifdef prefix
	mkdir -p $(prefix)
	for file in $(shell find . -path '*/.svn' -prune -o \
          -name '*.syn' -prune -o \
          -name '*.xref' -prune -o \
          -name 'xref_db' -prune -o \
          -name '*.html' -prune -o \
          -name '*.toc' -prune -o \
          -name '*.css' -prune -o \
          -name '*.png' -prune -o \
          -name '*.ps' -prune -o \
          -type f -a -print); do \
          mkdir -p $(prefix)/`dirname $$file`; \
          cp -p $$file $(prefix)/$$file; \
        done
endif