-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile.am.toplevel
157 lines (126 loc) · 4.54 KB
/
Makefile.am.toplevel
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Emacs: -*- makefile -*-
#
# Toplevel Makefile.am for a YaST2 subproject
#
# -- This file is generated by y2automake - DO NOT EDIT! --
# (Edit ./SUBDIRS instead)
#
#where devtools are
Y2TOOL = $(Y2DEVTOOLS_PREFIX)/bin/y2tool
RPMNAME = $(shell cat $(srcdir)/RPMNAME)
VERSION = $(shell rpm --specfile --qf "%{VERSION}" $(srcdir)/package/$(RPMNAME).spec)
SUBDIRS_FILE = $(shell test -e $(srcdir)/SUBDIRS && echo SUBDIRS)
ACINCLUDE_FILE = $(shell test -e $(srcdir)/acinclude.m4 && echo acinclude.m4)
COPYRIGHT_files = COPYING
doc_DATA = $(COPYRIGHT_files)
# do we do Makefile.am for devtools? It is a little special...
IS_DEVTOOLS = $(findstring yast2-devtools,$(RPMNAME))
DEVTOOLS_DIR = $(if $(IS_DEVTOOLS),$(srcdir),$(Y2DEVTOOLS_PREFIX)/share/YaST2/data/devtools)
# less strict; prefer bzip2
AUTOMAKE_OPTIONS = foreign dist-bzip2 no-dist-gzip
# where devtools install m4 snippets
# argh, executed literally
#ACLOCAL_AMFLAGS = -I $(Y2DEVTOOLS_PREFIX)/share/aclocal
ACLOCAL_AMFLAGS = -I . -I `if test -d ./build-tools; then echo ./build-tools; else pkg-config --print-errors --variable=datadir yast2-devtools; fi`/aclocal
Makefile.am.common: $(DEVTOOLS_DIR)/build-tools/Makefile.am.common
cmp -s $< $@ || cp -f $< $@
# create bzip2ed tar and make some sanity checks
$(RPMNAME)-$(VERSION).tar.bz2: checkpo dist-bzip2
@if [ `bunzip2 -c $(RPMNAME)-$(VERSION).tar.bz2 | wc --bytes` = 0 ] ; then \
echo "Error: created tar is empty" ; \
exit 1 ; \
fi
CLEANFILES =
MAINTAINERCLEANFILES = package/$(RPMNAME)-$(VERSION).tar.bz2 package/$(RPMNAME).spec
POT_DST = $(shell find -type d -name testsuite -prune , \
-type f -name "*.pot")
EXTRA_DIST = \
RPMNAME MAINTAINER configure.in.in \
$(COPYRIGHT_files) \
$(SUBDIRS_FILE) $(ACINCLUDE_FILE) \
$(if $(IS_DEVTOOLS),Makefile.am.common,$(POT_DST))
show-extra-dist:
@echo $(EXTRA_DIST)
# info '(automake)Conditionals'
if CREATE_PKGCONFIG
# create the file here instead of by configure
# because the prerequisite is made here (not anymore!)
# and we don't want any paths in y2autoconf
# info '(autoconf)config.status Invocation'
$(RPMNAME).pc: $(RPMNAME).pc.in config.status
./config.status --file=$@:$<
if CREATE_PKGCONFIG_NOARCH
pkgconfigdata_DATA = $(RPMNAME).pc
else
pkgconfig_DATA = $(RPMNAME).pc
endif
EXTRA_DIST += $(RPMNAME).pc.in
endif
pot:
$(Y2TOOL) y2makepot -s $(srcdir)
install-pot: pot
@POT_DST=`find -type d -name testsuite -prune , \
-type f -name "*.pot"` ; \
if [ -n "$$POT_DST" ] ; then \
echo "mkdir -p $(DESTDIR)$(potdir)" ; \
mkdir -p $(DESTDIR)$(potdir) ; \
list="$$POT_DST"; \
for I in $$list ; \
do \
echo $$I ; \
if [ "$$I" == "pot" ] ; then \
continue ; \
fi ; \
echo "$(INSTALL_DATA) $$I $(DESTDIR)$(potdir)" ; \
$(INSTALL_DATA) $$I $(DESTDIR)$(potdir) ; \
done ; \
fi
spellcheck: pot
$(Y2TOOL) pot-spellcheck
# all-local: $(if $(IS_DEVTOOLS),,$(POT_DST))
package-local: check-parse $(if $(IS_DEVTOOLS),,$(POT_DST)) $(RPMNAME)-$(VERSION).tar.bz2
rm -f package/$(RPMNAME)-*.tar.bz2
rm -f package/*~
rm -f package/*.bak
rm -f package/*.auto
mv $(RPMNAME)-$(VERSION).tar.bz2 package/
if ! test -x $(Y2TOOL); then \
echo "$(Y2TOOL): not found."; \
echo "You have to install yast2-devtools to making a package"; \
false; \
fi
here=`pwd`; \
cd $(srcdir) && for i in $(RPMNAME)*.spec.in; do \
if [ -f "$$i" ]; then \
newname="`echo "$$i" | sed "s/\.in$$//g"`"; \
$(Y2TOOL) create-spec < $$i > $$here/package/$${newname} ; \
fi \
done
package: check-up-to-date check-tagversion check-textdomain package-local
TAGVERSION = $(Y2TOOL) tagversion
# check if there is no modified files and all commits were pushed
check-up-to-date:
if [ `git status --short --branch | sed '/##[^[]*$/d;/^??/d' | wc -l` -gt 0 ]; then \
(echo "ERROR: Source is not commited and pushed. See `git status`"; false) \
fi
check-tagversion:
cd $(srcdir) && $(TAGVERSION) --check >/dev/null; \
[ $$? = 0 ] || ( echo "ERROR: Please run 'tagversion' first"; false )
check-parse-old:
@if [ `find -type f -name "*.ycp" | wc -l` -gt 0 -a "$(RPMNAME)" != "yast2-core" ] ; then \
echo "Running parseycp..." ; \
parseycp -q -R ; \
else \
echo "Not running parseycp." ; \
fi
check-parse:
@echo "Not running parseycp."
check-textdomain:
$(Y2TOOL) check-textdomain $(srcdir)
stable: checkin-stable
checkin-stable: package
$(Y2TOOL) checkin-stable
# For po/ modules
checkpo:
test ! -f $(srcdir)/po/Makefile || $(MAKE) -C po checkpo
# test ! -f $(srcdir)/po/Makefile || $(MAKE) -C po checkpo make-pox