-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (58 loc) · 2.2 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
VERSIONNUM:=1.2.8
VERSIONDATE:="2024-05-13"
PROGNAME:=queueing
SHA256SUM=
DISTNAME:=$(PROGNAME)-$(VERSIONNUM)
SUBDIRS:=inst doc test devel
DISTFILES:=COPYING NEWS DESCRIPTION CITATION INDEX README.md INSTALL
DISTSUBDIRS:=inst inst/private doc
.PHONY: clean check htmldocs
ALL: DESCRIPTION doc/conf.texi
for d in $(SUBDIRS); do \
$(MAKE) -C $$d $@; \
done
doc/conf.texi:
\rm -f doc/conf.texi
echo "@set VERSION $(VERSIONNUM)" > doc/conf.texi
echo "@set VERSIONDATE $(VERSIONDATE)" >> doc/conf.texi
% : %.in
cat $< | \
sed "s/PROGNAME/$(PROGNAME)/g" | \
sed "s/VERSIONNUM/$(VERSIONNUM)/g" | \
sed "s/VERSIONDATE/$(VERSIONDATE)/g" | \
sed "s/SHA256SUM/$(SHA256SUM)/g"> $@
check:
$(MAKE) -C test check
clean:
for d in $(SUBDIRS); do \
$(MAKE) -C $$d clean; \
done
\rm -r -f *~ $(DISTNAME).tar.gz $(DISTNAME).zip $(PROGNAME) $(PROGNAME)-html.tar.gz $(PROGNAME)-html INSTALL
distclean: clean
for d in $(SUBDIRS); do \
$(MAKE) -C $$d distclean; \
done
\rm -r -f doc/conf.texi docs/* fname DESCRIPTION queueing.yaml $(PROGNAME)-html
$(DISTNAME).tar.gz $(DISTNAME).zip:
\rm -r -f $(PROGNAME) fname
echo "$(PROGNAME)" > fname
mkdir $(PROGNAME)
for d in $(DISTSUBDIRS); do \
mkdir -p $(PROGNAME)/$$d; \
$(MAKE) -C $$d dist; \
done
ln $(DISTFILES) $(PROGNAME)/
tar cfz $(DISTNAME).tar.gz $(PROGNAME)/
zip -r $(DISTNAME).zip $(PROGNAME)/
htmldocs:
octave -qf --eval "pkg install -local $(DISTNAME).tar.gz; pkg load $(PROGNAME); pkg load pkg-octave-doc; cd docs; package_texi2html(\"$(PROGNAME)\"); pkg uninstall $(PROGNAME); cd ..;"
## The following target is deprecated and has been replaced by `htmldocs`
## that generates html documentation according to the new style.
#$(PROGNAME)-html.tar.gz:
# octave -qf --eval "pkg install -local $(DISTNAME).tar.gz; pkg load $(PROGNAME); pkg load generate_html; generate_package_html ('$(PROGNAME)', '$(PROGNAME)-html', 'octave-forge'); pkg uninstall $(PROGNAME)"
# tar cfz $(PROGNAME)-html.tar.gz $(PROGNAME)-html
queueing.yaml: queueing.yaml.in $(DISTNAME).tar.gz
queueing.yaml: SHA256SUM=$(shell sha256sum $(DISTNAME).tar.gz | cut -d ' ' -f 1)
dist: ALL $(DISTNAME).tar.gz $(DISTNAME).zip htmldocs queueing.yaml
sha256sum $(DISTNAME).tar.gz
sha256sum $(DISTNAME).zip