source: to-imperative/trunk/Makefile @ 1233

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