source: to-imperative/trunk/Makefile @ 1445

Last change on this file since 1445 was 1434, checked in by orlov, 16 years ago
  • Improved makefiles.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1#
2# $Id: Makefile 1434 2004-06-08 06:52:15Z orlov $
3#
4
5include rules.mk
6include version.mk
7
8ifeq ($(TARGET), cygwin)
9SUBDIRS = cygwin bootstrap compiler
10all : override SUBDIRS = cygwin bootstrap
11install : override SUBDIRS = cygwin bootstrap
12else
13SUBDIRS = libp++ runtime library bootstrap samples compiler
14all : override SUBDIRS = libp++ runtime library bootstrap
15install : override SUBDIRS = libp++ runtime library bootstrap
16endif
17
18INSTALL_SUBDIRS = $(SUBDIRS)
19
20DISTFILES = Makefile config.functions rules.mk config.guess
21DISTFILES += version.mk spec.in
22DISTFILES += ChangeLog createlog
23
24all::
25        @echo All done.
26
27bootstrap: all
28        $(MAKE) -C bootstrap bootstrap \
29          TOPDIR=$(TOPDIR)/.. INSTALL_DIR=$(INSTALL_DIR) \
30          CURRENTDIR=$(CURRENTDIR)/bootstrap DISTNAME="$(DISTNAME)"
31
32dist::
33        rm -rf $(ARCHIVEDIR)
34        mkdir $(ARCHIVEDIR)
35        cp -dpPr `cat $(DISTLIST)` $(ARCHIVEDIR)/
36        tar cvzf $(ARCHIVENAME) $(ARCHIVEDIR)/*
37        rm -rf $(ARCHIVEDIR)
38
39snapshot::
40        rm -rf $(SNAPSHOTDIR)
41        mkdir $(SNAPSHOTDIR)
42        cp -dpPr `cat $(DISTLIST)` $(SNAPSHOTDIR)/
43        tar cvzf $(SNAPSHOTNAME) $(SNAPSHOTDIR)/*
44        rm -rf $(SNAPSHOTDIR)
45
46$(PKGNAME).spec: spec.in
47        NAME="$(PKGNAME)" \
48        VERSION="$(PKGVERSION)" \
49        RELEASE="$(PKGRELEASE)" \
50        ARCHIVEDIR="$(ARCHIVEDIR)" \
51        . $< >$@
52
53$(PKGNAME)-snapshot.spec: spec.in
54        NAME="$(PKGNAME)-snapshot" \
55        VERSION="$(SNAPSHOTDATE)" \
56        RELEASE="$(PKGRELEASE)" \
57        ARCHIVEDIR="$(SNAPSHOTDIR)" \
58        . $< >$@
59
60.rpmmacros:
61        { \
62        echo "%_fixperms chmod -R  a+rX,u+w,g-w,o-w"; \
63        echo "%_topdir `pwd`"; \
64        echo "%_rpmdir `pwd`"; \
65        echo "%_srcrpmdir `pwd`"; \
66        echo "%_builddir `pwd`"; \
67        echo "%_sourcedir `pwd`"; \
68        echo "%_specdir `pwd`"; \
69        echo "%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm"; \
70        } >$@
71
72rpm: $(PKGNAME).spec .rpmmacros all dist
73        HOME=`pwd` rpm -ba $<
74        rm -rf $(BUILDROOT)
75
76snaprpm: $(PKGNAME)-snapshot.spec .rpmmacros all snapshot
77        HOME=`pwd` rpm -ba $<
78        rm -rf $(BUILDROOT)
79
80install:: all
81        mkdir -p -m 0755 $(INSTALL_DIR)/bin
82        install -m 0755 rfp.sh $(INSTALL_DIR)/bin/
83
84clean::
85        rm -f .rpmrc *.spec *.list
Note: See TracBrowser for help on using the repository browser.