ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/Makefile
Revision: 1.4
Committed: 1999-10-05T10:35:11Z (25 years, 1 month ago) by cebix
Branch: MAIN
Changes since 1.3: +3 -2 lines
Log Message:
- makeing a tarball works with "cvs export" instead of "cvs checkout"

File Contents

# Content
1 # Makefile for creating mon distributions
2 # Written in 1999 by Christian Bauer <Christian.Bauer@uni-mainz.de>
3
4 VERSION := $(shell sed <mon.spec -n '/^Version: */s///p')
5 RELEASE := $(shell sed <mon.spec -n '/^Release: */s///p')
6 VERNAME := mon-$(VERSION)
7
8 SRCARCHIVE := $(shell date +mon_src_%d%m%Y.tar.gz)
9 SRCRPM := $(VERNAME)-$(RELEASE).src.rpm
10 BINRPM := $(VERNAME)-$(RELEASE).i386.rpm
11 BEOSPPCARCHIVE := $(VERNAME)-$(RELEASE).beosppc.zip
12 BEOSX86ARCHIVE := $(VERNAME)-$(RELEASE).beosx86.zip
13
14 TMPDIR := $(shell date +/tmp/build%M%S)
15 RPMDIR := /usr/src/redhat
16 ISODATE := $(shell date "+%Y-%m-%d %H:%M")
17 DOCS := $(shell sed <mon.spec -n '/^\%doc */s///p')
18 SRCS := src
19
20 default:
21 @echo "This top-level Makefile is for creating Basilisk II distributions."
22 @echo "If you want to install Basilisk II V$(VERSION) on your system, please follow"
23 @echo "the instructions in the file INSTALL."
24 @echo "If you want to create a Basilisk II V$(VERSION) distribution, type \"make help\""
25 @echo "to get a list of possible targets."
26
27 help:
28 @echo "The following targets are available:"
29 @echo " tarball source tarball ($(SRCARCHIVE))"
30 @echo " rpm source and binary RPMs ($(SRCRPM) and $(BINRPM))"
31 @echo " beosppc BeOS/ppc binary archive ($(BEOSPPCARCHIVE))"
32 @echo " beosx86 BeOS/x86 binary archive ($(BEOSX86ARCHIVE))"
33
34 clean:
35 -rm -f $(SRCARCHIVE)
36 -rm -f $(SRCRPM) $(BINRPM)
37 -rm -f $(BEOSPPCARCHIVE) $(BEOSX86ARCHIVE)
38
39 #
40 # Source tarball
41 #
42 tarball: $(SRCARCHIVE)
43
44 $(SRCARCHIVE): $(SRCS) $(DOCS)
45 -rm -rf $(TMPDIR)
46 mkdir $(TMPDIR)
47 cd $(TMPDIR); cvs export -D "$(ISODATE)" mon
48 mv $(TMPDIR)/mon $(TMPDIR)/$(VERNAME)
49 cd $(TMPDIR); tar cfz $@ $(VERNAME)
50 mv $(TMPDIR)/$@ .
51 rm -rf $(TMPDIR)
52
53 #
54 # RPMs (source and i386 binary)
55 #
56 rpm: $(SRCRPM) $(BINRPM)
57
58 $(RPMDIR)/SOURCES/$(SRCARCHIVE): $(SRCARCHIVE)
59 cp $(SRCARCHIVE) $(RPMDIR)/SOURCES
60
61 $(RPMDIR)/SRPMS/$(SRCRPM) $(RPMDIR)/RPMS/i386/$(BINRPM): $(RPMDIR)/SOURCES/$(SRCARCHIVE) mon.spec
62 rpm -ba mon.spec
63
64 $(SRCRPM): $(RPMDIR)/SRPMS/$(SRCRPM)
65 cp $(RPMDIR)/SRPMS/$(SRCRPM) .
66
67 $(BINRPM): $(RPMDIR)/RPMS/i386/$(BINRPM)
68 cp $(RPMDIR)/RPMS/i386/$(BINRPM) .
69
70 #
71 # Binary archive for BeOS/ppc
72 #
73 beosppc: $(BEOSPPCARCHIVE)
74
75 $(BEOSPPCARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.ppc/mon
76 -rm -rf $(TMPDIR)
77 mkdir $(TMPDIR)
78 mkdir $(TMPDIR)/$(VERNAME)
79 cp $(DOCS) $(TMPDIR)/$(VERNAME)
80 cp src/BeOS/obj.ppc/mon $(TMPDIR)/$(VERNAME)
81 cd $(TMPDIR)/$(VERNAME); ln -s mon rmon
82 mimeset -f $(TMPDIR)
83 cd $(TMPDIR); zip -ry $@ $(VERNAME)/
84 mv $(TMPDIR)/$@ .
85 rm -rf $(TMPDIR)
86
87 #
88 # Binary archive for BeOS/x86
89 #
90 beosx86: $(BEOSX86ARCHIVE)
91
92 $(BEOSX86ARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.x86/mon
93 -rm -rf $(TMPDIR)
94 mkdir $(TMPDIR)
95 mkdir $(TMPDIR)/$(VERNAME)
96 cp $(DOCS) $(TMPDIR)/$(VERNAME)
97 cp src/BeOS/obj.x86/mon $(TMPDIR)/$(VERNAME)
98 cd $(TMPDIR)/$(VERNAME); ln -s mon rmon
99 mimeset -f $(TMPDIR)
100 cd $(TMPDIR); zip -ry $@ $(VERNAME)/
101 mv $(TMPDIR)/$@ .
102 rm -rf $(TMPDIR)