source: to-imperative/trunk/Makefile @ 842

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