-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile.in
80 lines (68 loc) · 3.02 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
VPATH = @srcdir@
SRCDIR = @srcdir@
PREFIX = @prefix@
CYGPATH = $(SRCDIR)/cygpath.sh
CYG_PREFIX = $(shell $(CYGPATH) $(PREFIX))
CYG_SRCDIR = $(shell $(CYGPATH) $(SRCDIR))
OZENGINE = @VAR_OZE@
BUILDDIR = @BUILDDIR@
CYG_BUILDDIR_OZMAKE = $(shell $(CYGPATH) $(BUILDDIR)/ozmake)
OZTOOL = @VAR_OZTOOL@
PLATFORM = $(shell $(OZTOOL) platform)
NOTDIRSRCDIR = $(notdir $(SRCDIR))
BUILDDATE = $(shell date '+%Y%m%d')
VERSION = $(shell $(OZTOOL) version)
ifeq ($(PLATFORM),win32-i486)
OZEMULATOR = $(shell $(CYGPATH) $(PREFIX)/platform/win32-i486/emulator.dll)
export OZEMULATOR
endif
all: build.ozmake
$(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR)
build.ozmake:
cd ozmake && $(MAKE) ozmake.ozf
install: all
$(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR) --install --nosavedb
$(OZENGINE) ozmake/ozmake.ozf --prefix=$(CYG_PREFIX) --srcdir=$(CYG_SRCDIR)/ozmake --builddir=$(CYG_BUILDDIR_OZMAKE) --install --nosavedb
export CLEANDIR
clean:
$(MAKE) CLEANDIR="$(BUILDDIR)" clean.dir
$(MAKE) CLEANDIR="$(BUILDDIR)/adt" clean.dir
$(MAKE) CLEANDIR="$(BUILDDIR)/os" clean.dir
$(MAKE) CLEANDIR="$(BUILDDIR)/wp" clean.dir
$(MAKE) CLEANDIR="$(BUILDDIR)/wp/qhtml" clean.dir
$(MAKE) CLEANDIR="$(BUILDDIR)/wp/qtk" clean.dir
$(MAKE) CLEANDIR="$(BUILDDIR)/xml" clean.dir
cd ozmake && $(MAKE) clean
clean.dir:
-cd $(CLEANDIR) && rm -f *~ *.ozf
distclean: clean
-cd ozmake && $(MAKE) distclean
-rm -f Makefile config.cache config.log config.status
######################################################################
# source tarball
######################################################################
COMPRESS= gzip -9
TAR= tar
PACKDIR= /tmp/pack
INSTALL_DIR= @INSTALL@ -d
src: $(PACKDIR)
echo "[" $(NOTDIRSRCDIR) "]"
test -n "$(NOTDIRSRCDIR)" || { echo "bad"; exit 1; }
## Create empty temp directory
-rm -rf $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std
mkdir $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std
## Move source files to temp directory
cd $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std && \
((cd $(SRCDIR) && $(TAR) -cf - .) | tar -xf -)
## Remove CVS cruft
cd $(PACKDIR) && \
(tbr=`find $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std -name CVS -type d 2>/dev/null` ; \
rm -rf $$tbr ; \
find $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std -name '.cvsignore' -type f -exec rm -f '{}' ';' ;) \
## tar up and compress
(cd $(PACKDIR) && $(TAR) -cf - mozart-$(VERSION).$(BUILDDATE)-std) | \
$(COMPRESS) > mozart-$(VERSION).$(BUILDDATE)-std.tar.gz
## remove temp directory
rm -rf $(PACKDIR)/mozart-$(VERSION).$(BUILDDATE)-std
$(PACKDIR):
INSTALL_DIR_CHMOD=777; export INSTALL_DIR_CHMOD && $(INSTALL_DIR) $@