-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
126 lines (120 loc) · 4.07 KB
/
Makefile.am
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
116
117
118
119
120
121
122
123
124
125
126
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src test
EXTRA_DIST = \
README.md \
tracebox.spec
build-dist: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
cd $(distdir)/_inst && tardir="." && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(abs_srcdir)/$(distdir)_build.tar.gz && cd -
$(am__post_remove_distdir)
if BUILDING_DEB
DEBSOURCEPKG=$(PACKAGE)_$(VERSION).orig.tar.gz
DEBSOURCEDIR=$(PACKAGE)-$(VERSION)
deb: dist
@echo "Building Debian package..."
@if test ! -d debian; then \
echo "The files needed for building a Debian package are not" \
"included by default in the distribution. To build a package, check" \
"out the project from source control."; \
exit 1; \
fi; \
mv -f $(PACKAGE)-$(VERSION).tar.gz $(DEBSOURCEPKG) && \
GZIP=$(GZIP_ENV) gzip -dc $(DEBSOURCEPKG) | $(am__untar) && \
$(MKDIR_P) $(DEBSOURCEDIR)/debian && \
cp \
debian/changelog \
debian/compat \
debian/control \
debian/copyright \
debian/docs \
debian/menu \
debian/rules \
$(DEBSOURCEDIR)/debian && \
cd $(DEBSOURCEDIR) && \
$(DEBUILD) -rfakeroot -D -us -uc; \
cd $(srcdir); \
rm --force $(DEBSOURCEPKG); \
rm --recursive --force $(DEBSOURCEDIR)
$(am__post_remove_distdir)
else
deb:
@echo "To build a Debian package, you must run configure with --enable-deb."
@exit 1
endif
if BUILDING_RPM
RPMDIR=`$(RPM) --eval %_rpmdir`
SRCRPMDIR=`$(RPM) --eval %_srcrpmdir`
RPMARCH=`$(RPM) --eval %_target_cpu`
BINRPM = $(PACKAGE)-$(VERSION)-$(RPM_RELEASE).$(RPMARCH).rpm
DEBUGRPM = $(PACKAGE)-debuginfo-$(VERSION)-$(RPM_RELEASE).$(RPMARCH).rpm
SRCRPM = $(PACKAGE)-$(VERSION)-$(RPM_RELEASE).src.rpm
rpm: dist
@echo "Building RPM package..."
@if $(RPMBUILD) -ta --clean $(PACKAGE)-$(VERSION).tar.gz; then \
if test -e $(RPMDIR)/$(BINRPM); then \
cp $(RPMDIR)/$(BINRPM) $(builddir); \
elif test -e $(RPMDIR)/$(RPMARCH)/$(BINRPM); then \
cp $(RPMDIR)/$(RPMARCH)/$(BINRPM) $(builddir); \
fi; \
test -e $(SRCRPMDIR)/$(SRCRPM) && \
cp $(SRCRPMDIR)/$(SRCRPM) $(builddir); \
if test -e $(RPMDIR)/$(DEBUGRPM); then \
cp $(RPMDIR)/$(DEBUGRPM) $(builddir); \
elif test -e $(RPMDIR)/$(RPMARCH)/$(DEBUGRPM); then \
cp $(RPMDIR)/$(RPMARCH)/$(DEBUGRPM) $(builddir); \
fi; \
fi
else
rpm:
@echo "To build an RPM package, you must run configure with --enable-rpm.";
@exit 1
endif