forked from dosemu2/dosemu2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
115 lines (93 loc) · 2.85 KB
/
Makefile
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Makefile for DOSEMU
#
all: default
srcdir=.
top_builddir=.
ifeq ($(filter deb rpm %/configure configure,$(MAKECMDGOALS)),)
-include Makefile.conf
endif
REALTOPDIR ?= $(abspath $(srcdir))
$(REALTOPDIR)/configure configure: $(REALTOPDIR)/configure.ac
cd $(@D) && autoreconf --install -v -I m4
Makefile.conf config.status etc/dosemu.desktop: $(REALTOPDIR)/configure
ifeq ($(findstring $(MAKECMDGOALS), clean realclean pristine distclean),)
@echo "Running configure ..."
$<
else
$< || true
endif
install: changelog
default install: config.status src/include/config.hh etc/dosemu.desktop
@$(MAKE) -C man $@
@$(MAKE) -C src $@
clean realclean:
@$(MAKE) -C man $@
@$(MAKE) -C src $@
uninstall:
@$(MAKE) -C src uninstall
docs:
@$(MAKE) -C src/doc all
@$(MAKE) -C src/doc install
docsclean:
@$(MAKE) -C src/doc clean
GIT_REV := $(shell $(REALTOPDIR)/git-rev.sh $(REALTOPDIR) $(top_builddir))
.LOW_RESOLUTION_TIME: $(GIT_REV)
$(PACKETNAME).tar.gz: $(GIT_REV) changelog
rm -f $(PACKETNAME).tar.gz
(cd $(REALTOPDIR); git archive -o $(abs_top_builddir)/$(PACKETNAME).tar --prefix=$(PACKETNAME)/ HEAD)
tar rf $(PACKETNAME).tar --transform 's,^,$(PACKETNAME)/,' --add-file=changelog; \
if [ -f "$(fdtarball)" ]; then \
tar -Prf $(PACKETNAME).tar --transform 's,^$(dir $(fdtarball)),$(PACKETNAME)/,' --add-file=$(fdtarball); \
fi
gzip $(PACKETNAME).tar
dist: $(PACKETNAME).tar.gz
rpm: dosemu2.spec
tito build --test --rpm
deb:
debuild -i -us -uc -b
changelog:
if [ -d $(top_srcdir)/.git -o -f $(top_srcdir)/.git ]; then \
git --git-dir=$(top_srcdir)/.git log >$@ ; \
else \
echo "Unofficial build by `whoami`, `date`" >$@ ; \
fi
log: changelog
tests:
python3 test/test_dos.py PPDOSGITTestCase
pristine distclean mrproper: Makefile.conf docsclean
@$(MAKE) -C src pristine
rm -f Makefile.conf
rm -f $(PACKETNAME).tar.gz
rm -f ChangeLog
rm -f `find . -name config.cache`
rm -f `find . -name config.status`
rm -f `find . -name config.log`
rm -f `find . -name aclocal.m4`
rm -f `find . -name configure`
rm -f `find . -name Makefile.conf`
rm -rf `find . -name autom4te*.cache`
rm -f debian/$(PACKAGE_NAME).*
rm -rf debian/$(PACKAGE_NAME)
rm -f debian/*-stamp
rm -f debian/files
rm -f src/include/config.hh
rm -f src/include/stamp-h1
rm -f src/include/config.hh.in
rm -f src/include/version.hh
rm -f `find . -name '*~'`
rm -f `find . -name '*[\.]o'`
rm -f `find src -type f -name '*.d'`
rm -f `find . -name '*[\.]orig'`
rm -f `find . -name '*[\.]rej'`
rm -f gen*.log
rm -f config.sub config.guess
rm -rf 2.*
rm -rf autom4te.cache
$(REALTOPDIR)/scripts/mkpluginhooks clean
tar: distclean
VERSION=`cat VERSION` && cd .. && tar czvf dosemu-$$VERSION.tgz dosemu-$$VERSION
flatpak-build: clean
flatpak-builder --ccache --force-clean --user --repo=repo \
--install builddir io.github.dosemu2.dosemu2.yml
flatpak-run:
flatpak run io.github.dosemu2.dosemu2