]>
Commit | Line | Data |
---|---|---|
4be6d2ac LO |
1 | # The following targets are for the maintainer only! do not run if you don't |
2 | # know what they do. | |
3 | ||
4 | .PHONY: printenv updateconfigs printchanges insertchanges startnewrelease diffupstream help updateportsconfigs editportsconfigs autoreconstruct finalchecks | |
5 | ||
6 | help: | |
7 | @echo "These are the targets in addition to the normal $(DEBIAN) ones:" | |
8 | @echo | |
9 | @echo " printenv : Print some variables used in the build" | |
10 | @echo | |
11 | @echo " updateconfigs : Update core arch configs" | |
12 | @echo | |
13 | @echo " editconfigs : Update core arch configs interractively" | |
14 | @echo " genconfigs : Generate core arch configs in CONFIGS/*" | |
15 | @echo | |
16 | @echo " updateportsconfigs : Update ports arch configs" | |
17 | @echo | |
18 | @echo " editportsconfigs : Update ports arch configs interactivly" | |
19 | @echo " genportconfigs : Generate ports arch configs in CONFIGS/*" | |
20 | @echo | |
21 | @echo " printchanges : Print the current changelog entries (from git)" | |
22 | @echo | |
23 | @echo " insertchanges : Insert current changelog entries (from git)" | |
24 | @echo | |
25 | @echo " startnewrelease : Start a new changelog set" | |
26 | @echo | |
27 | @echo " diffupstream : Diff stock kernel code against upstream (git)" | |
28 | @echo | |
29 | @echo " compileselftests : Only compile the selftests listed on ubuntu_selftests variable" | |
30 | @echo | |
31 | @echo " runselftests : Run the selftests listed on ubuntu_selftests variable" | |
32 | @echo | |
33 | @echo " help : If you are kernel hacking, you need the professional" | |
34 | @echo " version of this" | |
35 | @echo | |
36 | @echo "Environment variables:" | |
37 | @echo | |
38 | @echo " NOKERNLOG : Do not add upstream kernel commits to changelog" | |
39 | @echo " CONCURRENCY_LEVEL=X" | |
40 | @echo " : Use -jX for kernel compile" | |
41 | @echo " PRINTSHAS : Include SHAs for commits in changelog" | |
42 | ||
43 | printdebian: | |
44 | @echo "$(DEBIAN)" | |
45 | ||
46 | updateconfigs defaultconfigs editconfigs genconfigs dumpconfigs: | |
47 | dh_testdir; | |
48 | $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@ | |
49 | rm -rf build | |
50 | ||
51 | updateportsconfigs defaultportsconfigs editportsconfigs genportsconfigs askconfigs: | |
52 | dh_testdir; | |
53 | $(SHELL) $(DROOT)/scripts/misc/kernelconfig $@ ports | |
54 | rm -rf build | |
55 | ||
56 | printenv: | |
57 | dh_testdir | |
58 | @echo "src package name = $(src_pkg_name)" | |
59 | @echo "series = $(series)" | |
60 | @echo "release = $(release)" | |
61 | @echo "revisions = $(revisions)" | |
62 | @echo "revision = $(revision)" | |
63 | @echo "uploadnum = $(uploadnum)" | |
64 | @echo "prev_revisions = $(prev_revisions)" | |
65 | @echo "prev_revision = $(prev_revision)" | |
66 | @echo "abinum = $(abinum)" | |
67 | @echo "upstream_tag = $(upstream_tag)" | |
68 | @echo "gitver = $(gitver)" | |
69 | @echo "variants = $(variants)" | |
70 | @echo "flavours = $(flavours)" | |
71 | @echo "skipabi = $(skipabi)" | |
72 | @echo "skipmodule = $(skipmodule)" | |
73 | @echo "skipdbg = $(skipdbg)" | |
74 | @echo "ubuntu_log_opts = $(ubuntu_log_opts)" | |
75 | @echo "CONCURRENCY_LEVEL = $(CONCURRENCY_LEVEL)" | |
76 | @echo "ubuntu_selftests = $(ubuntu_selftests)" | |
77 | @echo "bin package name = $(bin_pkg_name)" | |
78 | @echo "hdr package name = $(hdrs_pkg_name)" | |
79 | @echo "doc package name = $(doc_pkg_name)" | |
80 | @echo "do_doc_package = $(do_doc_package)" | |
81 | @echo "do_doc_package_content = $(do_doc_package_content)" | |
82 | @echo "do_source_package = $(do_source_package)" | |
83 | @echo "do_source_package_content = $(do_source_package_content)" | |
84 | @echo "do_libc_dev_package = $(do_libc_dev_package)" | |
85 | @echo "do_flavour_image_package = $(do_flavour_image_package)" | |
86 | @echo "do_flavour_header_package = $(do_flavour_header_package)" | |
87 | @echo "do_common_headers_indep = $(do_common_headers_indep)" | |
88 | @echo "do_full_source = $(do_full_source)" | |
89 | @echo "do_tools = $(do_tools)" | |
90 | @echo "do_any_tools = $(do_any_tools)" | |
91 | @echo "do_linux_tools = $(do_linux_tools)" | |
92 | @echo " do_tools_cpupower = $(do_tools_cpupower)" | |
93 | @echo " do_tools_perf = $(do_tools_perf)" | |
94 | @echo " do_tools_bpftool = $(do_tools_bpftool)" | |
95 | @echo " do_tools_x86 = $(do_tools_x86)" | |
96 | @echo " do_tools_host = $(do_tools_host)" | |
97 | @echo "do_cloud_tools = $(do_cloud_tools)" | |
98 | @echo " do_tools_hyperv = $(do_tools_hyperv)" | |
99 | @echo "any_signed = $(any_signed)" | |
100 | @echo " uefi_signed = $(uefi_signed)" | |
101 | @echo " opal_signed = $(opal_signed)" | |
102 | @echo " sipl_signed = $(sipl_signed)" | |
103 | @echo "full_build = $(full_build)" | |
104 | @echo "libc_dev_version = $(libc_dev_version)" | |
105 | @echo "DEB_HOST_GNU_TYPE = $(DEB_HOST_GNU_TYPE)" | |
106 | @echo "DEB_BUILD_GNU_TYPE = $(DEB_BUILD_GNU_TYPE)" | |
107 | @echo "DEB_HOST_ARCH = $(DEB_HOST_ARCH)" | |
108 | @echo "DEB_BUILD_ARCH = $(DEB_BUILD_ARCH)" | |
109 | @echo "arch = $(arch)" | |
110 | @echo "kmake = $(kmake)" | |
111 | ||
112 | printchanges: | |
113 | @baseCommit=$$(git log --pretty=format:'%H %s' | \ | |
114 | gawk '/UBUNTU: '".*Ubuntu-.*`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \ | |
115 | if [ -z "$$baseCommit" ]; then \ | |
116 | echo "WARNING: couldn't find a commit for the previous version. Using the lastest one." >&2; \ | |
117 | baseCommit=$$(git log --pretty=format:'%H %s' | \ | |
118 | gawk '/UBUNTU:\s*Ubuntu-.*$$/ { print $$1; exit }'); \ | |
119 | fi; \ | |
120 | git log "$$baseCommit"..HEAD | \ | |
121 | $(DROOT)/scripts/misc/git-ubuntu-log $(ubuntu_log_opts) | |
122 | ||
123 | insertchanges: autoreconstruct finalchecks | |
124 | @perl -w -f $(DROOT)/scripts/misc/insert-changes.pl $(DROOT) $(DEBIAN) | |
125 | ||
126 | autoreconstruct: | |
127 | # No need for reconstruct for -rc kernels since we don't upload an | |
128 | # orig tarball, so just remove it. | |
129 | if grep -q "^EXTRAVERSION = -rc[0-9]\+$$" Makefile; then \ | |
130 | echo "exit 0" >$(DEBIAN)/reconstruct; \ | |
131 | else \ | |
132 | $(DROOT)/scripts/misc/gen-auto-reconstruct $(upstream_tag) $(DEBIAN)/reconstruct $(DROOT)/source/options; \ | |
133 | fi | |
134 | ||
135 | finalchecks: debian/control | |
136 | $(DROOT)/scripts/misc/final-checks "$(DEBIAN)" "$(prev_fullver)" | |
137 | ||
138 | diffupstream: | |
139 | @git diff-tree -p refs/remotes/linux-2.6/master..HEAD $(shell ls | grep -vE '^(ubuntu|$(DEBIAN)|\.git.*)') | |
140 | ||
141 | startnewrelease: | |
142 | dh_testdir | |
143 | @[ -f "$(DEBIAN)/etc/update.conf" ] && . "$(DEBIAN)/etc/update.conf"; \ | |
144 | if [ -n "$$BACKPORT_SUFFIX" ]; then \ | |
6ae64b5b | 145 | ver="$$(dpkg-parsechangelog -l"$$DEBIAN_MASTER/changelog" -SVersion)$${BACKPORT_SUFFIX}.1"; \ |
4be6d2ac LO |
146 | prev_ver="$$(dpkg-parsechangelog -l"$(DEBIAN)/changelog" -SVersion)"; \ |
147 | if [ "$${ver%.*}" = "$${prev_ver%.*}" ]; then \ | |
148 | ver="$${ver%.*}.$$(( $${prev_ver##*.} +1 ))"; \ | |
149 | fi; \ | |
150 | else \ | |
151 | ver="$(release)-$$(echo "$(revision)" | \ | |
152 | perl -ne 'if (/^(\d*)\.(\d*)(.*)?$$/) { printf("%d.%d%s\n", $$1 + 1, $$2 +1, $$3) }')"; \ | |
153 | fi; \ | |
154 | now="$(shell date -R)"; \ | |
155 | echo "Creating new changelog set for $$ver..."; \ | |
156 | echo -e "$(src_pkg_name) ($$ver) UNRELEASED; urgency=medium\n" > $(DEBIAN)/changelog.new; \ | |
157 | echo " CHANGELOG: Do not edit directly. Autogenerated at release." >> \ | |
158 | $(DEBIAN)/changelog.new; \ | |
159 | echo " CHANGELOG: Use the printchanges target to see the curent changes." \ | |
160 | >> $(DEBIAN)/changelog.new; \ | |
161 | echo " CHANGELOG: Use the insertchanges target to create the final log." \ | |
162 | >> $(DEBIAN)/changelog.new; \ | |
163 | echo -e "\n -- $$DEBFULLNAME <$$DEBEMAIL> $$now\n" >> \ | |
164 | $(DEBIAN)/changelog.new ; \ | |
165 | cat $(DEBIAN)/changelog >> $(DEBIAN)/changelog.new; \ | |
166 | mv $(DEBIAN)/changelog.new $(DEBIAN)/changelog | |
167 | ||
168 | compileselftests: | |
169 | # a loop is needed here to fail on errors | |
170 | for test in $(ubuntu_selftests); do \ | |
171 | $(kmake) -C tools/testing/selftests TARGETS="$$test"; \ | |
172 | done; | |
173 | ||
174 | runselftests: | |
175 | $(kmake) -C tools/testing/selftests TARGETS="$(ubuntu_selftests)" run_tests |