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