ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/mon/Makefile
Revision: 1.7
Committed: 2000-04-24T13:09:54Z (24 years, 6 months ago) by cebix
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
- added binary dump command
- converted to automake

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 rm $(TMPDIR)/mon/mon.spec $(TMPDIR)/mon/Makefile
49 mv $(TMPDIR)/mon $(TMPDIR)/$(VERNAME)
50 cd $(TMPDIR); tar cfz $@ $(VERNAME)
51 mv $(TMPDIR)/$@ .
52 rm -rf $(TMPDIR)
53
54 #
55 # RPMs (source and i386 binary)
56 #
57 rpm: $(SRCRPM) $(BINRPM)
58
59 $(RPMDIR)/SOURCES/$(SRCARCHIVE): $(SRCARCHIVE)
60 cp $(SRCARCHIVE) $(RPMDIR)/SOURCES
61
62 $(RPMDIR)/SRPMS/$(SRCRPM) $(RPMDIR)/RPMS/i386/$(BINRPM): $(RPMDIR)/SOURCES/$(SRCARCHIVE) mon.spec
63 rpm -ba mon.spec
64
65 $(SRCRPM): $(RPMDIR)/SRPMS/$(SRCRPM)
66 cp $(RPMDIR)/SRPMS/$(SRCRPM) .
67
68 $(BINRPM): $(RPMDIR)/RPMS/i386/$(BINRPM)
69 cp $(RPMDIR)/RPMS/i386/$(BINRPM) .
70
71 #
72 # Binary archive for BeOS/ppc
73 #
74 beosppc: $(BEOSPPCARCHIVE)
75
76 $(BEOSPPCARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.ppc/mon
77 -rm -rf $(TMPDIR)
78 mkdir $(TMPDIR)
79 mkdir $(TMPDIR)/$(VERNAME)
80 cp $(DOCS) $(TMPDIR)/$(VERNAME)
81 cp src/BeOS/obj.ppc/mon $(TMPDIR)/$(VERNAME)
82 cd $(TMPDIR)/$(VERNAME); ln -s mon rmon
83 mimeset -f $(TMPDIR)
84 cd $(TMPDIR); zip -ry $@ $(VERNAME)/
85 mv $(TMPDIR)/$@ .
86 rm -rf $(TMPDIR)
87
88 #
89 # Binary archive for BeOS/x86
90 #
91 beosx86: $(BEOSX86ARCHIVE)
92
93 $(BEOSX86ARCHIVE): $(SRCS) $(DOCS) src/BeOS/obj.x86/mon
94 -rm -rf $(TMPDIR)
95 mkdir $(TMPDIR)
96 mkdir $(TMPDIR)/$(VERNAME)
97 cp $(DOCS) $(TMPDIR)/$(VERNAME)
98 cp src/BeOS/obj.x86/mon $(TMPDIR)/$(VERNAME)
99 cd $(TMPDIR)/$(VERNAME); ln -s mon rmon
100 mimeset -f $(TMPDIR)
101 cd $(TMPDIR); zip -ry $@ $(VERNAME)/
102 mv $(TMPDIR)/$@ .
103 rm -rf $(TMPDIR)