Last change
on this file since 11 was
11,
checked in by tim, 20 years ago
|
Added .release target and install target to make files.
|
File size:
1.2 KB
|
Line | |
---|
1 | # $Id: Makefile 3 2005-02-18 03:59:23Z tim $ |
---|
2 | |
---|
3 | # Installation prefix. Change to install elsewhere |
---|
4 | |
---|
5 | PREFIX=/usr/local |
---|
6 | |
---|
7 | ################################################################################ |
---|
8 | |
---|
9 | CC=gcc |
---|
10 | OPTS=-ggdb -std=gnu89 -pedantic -Wall |
---|
11 | #OPTS=-std=gnu89 -pedantic -Wall |
---|
12 | |
---|
13 | BUILD=$(CURDIR)/build |
---|
14 | BUILD_BIN=$(BUILD)/bin |
---|
15 | BUILD_DOC=$(BUILD)/doc |
---|
16 | |
---|
17 | BUILD_TREE=$(BUILD_BIN) $(BUILD_ETC) $(BUILD_DOC) |
---|
18 | SUB_DIRS=src doc |
---|
19 | |
---|
20 | FILES=$(REGLOOKUP) |
---|
21 | .PHONY: $(SUB_DIRS) clean |
---|
22 | export |
---|
23 | |
---|
24 | |
---|
25 | all: $(BUILD_TREE) $(SUB_DIRS) |
---|
26 | |
---|
27 | install: all |
---|
28 | mkdir -p $(PREFIX)/bin |
---|
29 | mkdir -p $(PREFIX)/share/doc/reglookup |
---|
30 | cp -r build/bin/* $(PREFIX)/bin/ |
---|
31 | cp -r build/doc/* $(PREFIX)/share/doc/reglookup/ |
---|
32 | |
---|
33 | $(SUB_DIRS): |
---|
34 | $(MAKE) -C $@ |
---|
35 | |
---|
36 | $(BUILD_TREE): |
---|
37 | mkdir -p $@ |
---|
38 | |
---|
39 | clean: |
---|
40 | rm -rf $(BUILD)/* |
---|
41 | |
---|
42 | |
---|
43 | # For developer use only |
---|
44 | RELEASE_VER=0.1 |
---|
45 | RELEASE_DEST=. |
---|
46 | .release: |
---|
47 | rm -rf .release |
---|
48 | mkdir .release |
---|
49 | # XXX: checkout version should be based on RELEASE_VER |
---|
50 | svn export svn+ssh://pascal/home/projects/subversion/reglookup/\ |
---|
51 | .release/reglookup-$(RELEASE_VER) |
---|
52 | cd .release/reglookup-$(RELEASE_VER)/doc && make generate |
---|
53 | cd .release\ |
---|
54 | && tar cf reglookup-$(RELEASE_VER).tar reglookup-$(RELEASE_VER)\ |
---|
55 | && gzip -9 reglookup-$(RELEASE_VER).tar |
---|
56 | mv .release/reglookup-$(RELEASE_VER).tar.gz $(RELEASE_DEST) |
---|
57 | rm -rf .release |
---|
Note: See
TracBrowser
for help on using the repository browser.