-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
128 lines (95 loc) · 3.22 KB
/
Makefile
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
121
122
123
124
125
126
127
128
### Makefile --- Toplevel directory
## Copyright (C) 2010-2012, 2015, 2021 Didier Verna
## Author: Didier Verna <[email protected]>
## This file is part of Clon.
## Permission to use, copy, modify, and distribute this software for any
## purpose with or without fee is hereby granted, provided that the above
## copyright notice and this permission notice appear in all copies.
## THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
## WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
## ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
## OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
### Commentary:
## Contents management by FCM version 0.1.
## Please use GNU Make with this makefile.
### Code:
TOP_DIR := .
include make/config.make
include make/version.make
include make/prologue.make
SUBDIRS := demos share doc
DIST_NAME := $(PROJECT)-$(SHORT_VERSION)
TARBALL := $(DIST_NAME).tar.gz
SIGNATURE := $(TARBALL).asc
all:
$(MAKE) gen TARGET=all
$(MAKE) INSTALL
all-formats info pdf html dvi ps localref generate:
cd doc && $(MAKE) $@
# Needed because we have an INSTALL file which fucks up the gen mechanism
# on case-insensitive OSX platforms.
install:
$(MAKE) gen TARGET=install
uninstall:
$(MAKE) gen TARGET=uninstall
clean:
-rm *~
$(MAKE) gen TARGET=clean
distclean: clean
$(MAKE) gen TARGET=distclean
-rm *.tar.gz *.tar.gz.asc
-rm -fr $($(LISP)_BINLOC)-*
-rm -fr "${HOME}"/.cache/common-lisp/$($(LISP)_CACHE)-*"`pwd`"
tag:
git tag -a -m 'Version $(LONG_VERSION)' 'version-$(SHORT_VERSION)'
tar: $(TARBALL)
gpg: $(SIGNATURE)
dist: tar gpg
install-www: dist
$(MAKE) gen TARGET=install-www
-install -m 644 $(TARBALL) "$(W3DIR)/attic/"
-install -m 644 $(SIGNATURE) "$(W3DIR)/attic/"
echo "\
<? lref (\"$(PROJECT)/attic/$(PROJECT)-$(SHORT_VERSION).tar.gz\", \
contents (\"Dernière version\", \"Latest version\")); ?> \
| \
<? lref (\"$(PROJECT)/attic/$(PROJECT)-$(SHORT_VERSION).tar.gz.asc\", \
contents (\"Signature GPG\", \"GPG Signature\")); ?>" \
> "$(W3DIR)/latest.txt"
chmod 644 "$(W3DIR)/latest.txt"
cd "$(W3DIR)" \
&& ln -fs attic/$(TARBALL) latest.tar.gz \
&& ln -fs attic/$(SIGNATURE) latest.tar.gz.asc
gen:
@for i in $(SUBDIRS) ; do \
echo "making $(TARGET) in $${i} ..." ; \
( cd $${i} && $(MAKE) $(TARGET) ) ; \
done
INSTALL: doc/$(PROJECT)-user.info
info --file=./doc/$(PROJECT)-user.info \
-n Installation \
-n Configuration \
-n 'Non-ANSI Features' \
-n 'Supported Platforms' \
--output=$@
perl -pi -e 's/^File:.*\n//g' $@
doc/$(PROJECT)-user.info:
cd doc && $(MAKE) $(PROJECT)-user.info
$(TARBALL):
git archive --format=tar --prefix=$(DIST_NAME)/ \
--worktree-attributes HEAD \
| gzip -c > $@
$(SIGNATURE): $(TARBALL)
gpg -b -a $<
include make/epilogue.make
.DEFAULT:
$(MAKE) gen TARGET=$@
.PHONY: all \
install uninstall \
clean distclean \
tag tar gpg dist install-www \
gen
### Makefile ends here