{"id":333206,"date":"2022-05-17T03:00:12","date_gmt":"2022-05-17T03:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=333206"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=333206","title":{"rendered":"<span>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Makefile-\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438 \u0432 \u0441\u0440\u0435\u0434\u0435 CLion<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: &#171;\u043c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0440\u0435\u0434\u0435 CLion&#187;. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 \u0440\u0430\u0437\u0430 \u0432 \u0440\u0430\u0437 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c \u043b\u044e\u0434\u044f\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435. \u0421\u0442\u0430\u0442\u044c\u044f \u0438\u043c\u0435\u0435\u0442 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u0442 \u043e\u043f\u044b\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <a href=\"https:\/\/www.jetbrains.com\/help\/clion\/makefiles-support.html\" rel=\"nofollow noopener noreferrer\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0432\u0430\u043c \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043b\u0435\u043d\u044c \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u0441\u043a\u0443\u0447\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043f\u0440\u044f\u043c\u043e \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 &#171;\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438&#187;.<\/p>\n<p>  <\/p>\n<h2 id=\"postanovka-zadachi\">\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h2>\n<p>  <\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u043c\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438 <em>Make<\/em>, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u043e\u0432\u043d\u044b\u043c \u0441\u0447\u0451\u0442\u043e\u043c \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442. \u0435. \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u0430\u043a\u0438\u0435 \u043a\u043b\u044e\u0447\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 \u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b, \u0438 \u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u042d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u043d. \u0412 \u044d\u0442\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441\u0440\u0435\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 (IDE) \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438 <em>Make<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>Makefile<\/code><\/li>\n<li><code>foo.c<\/code><\/li>\n<li><code>bar.c<\/code><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u043c <code>Makefile<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">.PHONY: all all: foo  .PHONY: clean clean:     $(RM) foo<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0444\u0430\u0439\u043b <code>foo.c<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0442. \u043a. \u0431\u0443\u0434\u0435\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 (\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <code>$(CC) foo.c -o foo<\/code>), \u0430 \u0444\u0430\u0439\u043b <code>bar.c<\/code> \u2014 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"podhody-k-analizu-proektnoy-modeli\">\u041f\u043e\u0434\u0445\u043e\u0434\u044b \u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>  <\/p>\n<h3 id=\"baza-dannyh-kompilyacii\">\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/h3>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 &#171;\u0432 \u043b\u043e\u0431&#187; \u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u0443\u0436 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0444\u043b\u0430\u0433\u0430\u043c\u0438 \u0431\u044b\u043b\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430 <a href=\"https:\/\/clang.llvm.org\/docs\/JSONCompilationDatabase.html\" rel=\"nofollow noopener noreferrer\"><code>compile_commands.json<\/code><\/a> (\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438) \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u2014 <a href=\"https:\/\/github.com\/rizsotto\/Bear\" rel=\"nofollow noopener noreferrer\"><code>bear<\/code><\/a> \u0438\u043b\u0438 <a href=\"https:\/\/github.com\/nickdiego\/compiledb\" rel=\"nofollow noopener noreferrer\"><code>compiledb<\/code><\/a>. <code>bear<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 (<code>LD_PRELOAD<\/code>) \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u0432\u044b\u0434\u0430\u0451\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0431\u043e\u0440\u043a\u0438 (\u0442. \u0435. \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438, \u0445\u043e\u0442\u044c \u0441 \u0447\u0451\u0440\u0442\u043e\u043c \u0432 \u0441\u0442\u0443\u043f\u0435, \u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 <em>Make<\/em>), \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 <em>Mac OS X<\/em> \u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 <em>Windows<\/em>. \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, <code>compiledb<\/code> \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e <em>\u0432\u044b\u0432\u043e\u0434<\/em> \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>make<\/code> \u0438 \u043f\u043e\u0442\u043e\u043c\u0443 \u043d\u0435\u0440\u0435\u0434\u043a\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u043d\u043e, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0435\u0437\u0434\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <em>Linux<\/em>, \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 <code>bear<\/code>. \u041f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435, \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043e\u043a, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0446\u0438\u0435\u0439 \u0434\u0432\u043e\u0439\u043d\u044b\u0445 \u043a\u0430\u0432\u044b\u0447\u0435\u043a, \u0430\u043f\u043e\u0441\u0442\u0440\u043e\u0444\u043e\u0432 \u0438 \u043f\u0443\u0442\u0435\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u044b.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, &#171;\u043e\u0431\u0435\u0440\u043d\u0443\u0432&#187; \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 <code>bear make<\/code> \u0438\u043b\u0438 <code>bear make all<\/code>, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u043c\u0435\u0435\u043c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0437\u0430\u0432\u0435\u0442\u043d\u044b\u0439 <code>compile_commands.json<\/code>. <em>CLion<\/em> \u0432\u043f\u043e\u043b\u043d\u0435 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u043e \u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043f\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u043c\u0435\u0440\u0435 2 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0421\u0431\u043e\u0440\u043a\u0430 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043c\u0438\u043d\u0443\u0442 (\u044f\u0434\u0440\u043e <em>Linux<\/em>) \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0447\u0430\u0441\u044b, \u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 IDE \u0445\u043e\u0447\u0435\u0442\u0441\u044f &#171;\u043f\u043e\u0447\u0442\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e&#187;.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043a\u0440\u044b\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0446\u0435\u043b\u044c\u044e &#171;\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434&#187;, \u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c\/\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0430\u043c <code>Makefile<\/code> \u0438\u043b\u0438 \u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f (\u043a\u0430\u043a \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445 \u0441\u0431\u043e\u0440\u043a\u0438 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/Autotools\" rel=\"nofollow noopener noreferrer\"><em>GNU Autotools<\/em><\/a>, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043f\u043e\u0432\u0435\u0440\u0445 <em>Make<\/em>), \u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u0430\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u0418 \u044d\u0442\u043e \u043c\u0443\u0442\u043e\u0440\u043d\u043e, \u0441\u043a\u0430\u0436\u0443 \u044f \u0432\u0430\u043c.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c, \u043d\u0435\u0442 \u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0441\u0431\u043e\u0440\u043a\u0443.<\/p>\n<p>  <\/p>\n<h3 id=\"pereopredelenie-peremennyh-okruzheniya\">\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>  <\/p>\n<h4 id=\"pereopredelenie-peremennoy-make\">\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>$(MAKE)<\/code><\/h4>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b <em>Make<\/em> (\u0441\u043c. <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/Recursion.html\" rel=\"nofollow noopener noreferrer\"><code>5.7 Recursive Use of make<\/code><\/a>), \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>MAKE<\/code> \u0438, \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 &#171;\u043e\u0431\u0451\u0440\u0442\u043a\u0438&#187; \u043d\u0430\u0434 <em>Make<\/em> (<code>MAKE=my-custom-make-wrapper<\/code>), \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0438, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0444\u043b\u0430\u0433\u0438 <em>Make<\/em>, \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  <\/p>\n<h4 id=\"pereopredelenie-kompilyatorov\">\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432<\/h4>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>CC<\/code> \u0438 <code>CXX<\/code> (\u0438 \u0438\u043c\u0435\u044f &#171;\u043e\u0431\u0451\u0440\u0442\u043a\u0443&#187;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430), \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u043e\u0447\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0438 \u0441 \u043a\u0430\u043a\u0438\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0431\u044b\u043b \u0432\u044b\u0437\u0432\u0430\u043d.<\/p>\n<p>  <\/p>\n<h4 id=\"pereopredelenie-obolochki\">\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438<\/h4>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>SHELL<\/code> (\u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 &#171;\u043e\u0431\u0451\u0440\u0442\u043a\u0438&#187;, \u043e\u043f\u044f\u0442\u044c \u0436\u0435), \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 (\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438).<\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432\u044b\u0448\u0435\u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<h3 id=\"perehvat-sistemnyh-vyzovov\">\u041f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430 <em>Linux<\/em>, <em>Solaris<\/em> \u0438, \u0441 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0430\u043c\u0438, <em>Mac OS X<\/em> \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 <a href=\"https:\/\/www.tutorialspoint.com\/unix_system_calls\/execve.htm\" rel=\"nofollow noopener noreferrer\"><code>execve()<\/code><\/a> (\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445 \u043d\u0430\u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u0445) \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c <code>LD_PRELOAD<\/code> \u0438\u043b\u0438 (<em>Linux<\/em>) \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <a href=\"https:\/\/man7.org\/linux\/man-pages\/man1\/strace.1.html\" rel=\"nofollow noopener noreferrer\"><code>strace<\/code><\/a>. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<p>\u041c\u043d\u0435 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0433\u0434\u0435 \u0431\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0431\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u044d\u0442\u0438 \u0442\u0435\u0445\u043d\u0438\u043a\u0438, \u043a\u0440\u043e\u043c\u0435, \u0431\u044b\u0442\u044c \u043c\u043e\u0436\u0435\u0442, <em>NetBeans CND<\/em> \u0438 <em>Oracle Solaris Studio<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <code>Makefile<\/code>-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430\u0445 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b\u0430\u0441\u044c \u0441 2016 \u0433\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"zapusk-_make_-v-rezhime-dry-run\">\u0417\u0430\u043f\u0443\u0441\u043a <em>Make<\/em> \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 &#171;dry run&#187;<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u043a &#171;\u0440\u0435\u043f\u0435\u0442\u0438\u0446\u0438\u044f&#187;, \u043d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043f\u0440\u0435\u0434\u044c \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0435\u0436\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e &#171;dry run&#187;, \u043a\u0430\u043a \u0432 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0412\u043e\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 <em>GNU Make<\/em>:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>-n, &#8212;just-print, &#8212;dry-run, &#8212;recon<\/strong><\/p>\n<p>  Print the commands that would be executed, but do not execute them (except in certain circumstances).<\/p><\/blockquote>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u0430, \u043d\u0430\u043c \u0435\u0449\u0451 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0444\u043b\u0430\u0433 <code>w<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>-w, &#8212;print-directory<\/strong><\/p>\n<p>  Print a message containing the working directory before and after other processing. This may be useful for tracking down errors from complicated nests of recursive make commands.<\/p><\/blockquote>\n<p>\u0438 \u0444\u043b\u0430\u0433 <code>k<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>-k, &#8212;keep-going<\/strong><\/p>\n<p>  Continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same.<\/p><\/blockquote>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0431\u0443\u0434\u0435\u0442 <code>make -wnk<\/code>, \u0438 \u0432\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <em>Make<\/em> \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u042d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0442\u043e\u0447\u0435\u043d, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u043d\u043e \u043e\u043d \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0438 \u0432 <em>CLion<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0412\u0440\u0443\u0447\u043d\u0443\u044e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0444\u043b\u0430\u0433\u0438 <code>w<\/code>, <code>n<\/code> \u0438 <code>k<\/code> \u043d\u0435 \u043d\u0443\u0436\u043d\u043e: \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 <em>CLion<\/em> \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0444\u043b\u0430\u0433\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445, \u043d\u043e \u0434\u043e\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u0433\u0434\u0435 \u0432 \u044d\u0442\u043e\u043c \u0431\u044b\u043b\u0430 \u0431\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c, \u0438\u0441\u0447\u0435\u0437\u0430\u044e\u0449\u0435 \u043c\u0430\u043b\u0430:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yq\/t5\/vk\/yqt5vk2ywbgbttdhkltj4flao20.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yq\/t5\/vk\/yqt5vk2ywbgbttdhkltj4flao20.png\"\/><\/p>\n<p>  <\/p>\n<h2 id=\"vydelenie-spiska-celey\">\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0446\u0435\u043b\u0435\u0439<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, <em>CLion<\/em> \u0443\u043c\u0435\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 <em>\u0446\u0435\u043b\u0438<\/em> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u044b \u0432 <code>Makefile<\/code>. \u041a\u0430\u0436\u0434\u0430\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0442\u0438\u043f\u0430 <a href=\"https:\/\/www.jetbrains.com\/help\/clion\/run-debug-configuration-makefile-application.html\" rel=\"nofollow noopener noreferrer\"><em>Makefile Application<\/em><\/a>:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/wp\/pn\/be\/wppnbeoemwwan_nwgyqsvz83i_4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/wp\/pn\/be\/wppnbeoemwwan_nwgyqsvz83i_4.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"_gnu-make_\"><em>GNU Make<\/em><\/h3>\n<p>  <\/p>\n<p>\u0414\u043b\u044f <em>GNU Make<\/em> \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0446\u0435\u043b\u044f\u0445 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/scop\/bash-completion\/blob\/master\/completions\/make\" rel=\"nofollow noopener noreferrer\">bash-completion<\/a>, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u043b\u0430\u0433\u043e\u043c <code>p<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>-p, &#8212;print-data-base<\/strong><\/p>\n<p>  Print the data base (rules and variable values) that results from reading the makefiles; then execute as usual or as otherwise specified. This also prints the version information given by the <code>-v<\/code> switch. To print the data base without trying to remake any files, use <code>make -p -f\/dev\/null<\/code>.<\/p><\/blockquote>\n<p>\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>make -npq<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"_bsd-make_\"><em>BSD Make<\/em><\/h3>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u0435\u043d \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434: <em>BSD Make<\/em> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0444\u043b\u0430\u0433\u0435 <code>p<\/code>, \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 GNU.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f <em>CLion<\/em> \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 <em>BSD Make<\/em>, \u043d\u043e, \u0447\u0438\u0441\u0442\u043e \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, &#171;\u043d\u0430\u0443\u0447\u0438\u0442\u044c&#187; \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0446\u0435\u043b\u044f\u043c\u0438 <em>BSD Make<\/em> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f (\u043e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439) \u0444\u043b\u0430\u0433 <code>V<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>-V variable<\/strong><\/p>\n<p>  Print <code>bmake<\/code>&#8216;s idea of the value of <em>variable<\/em>, in the global context. Do not build any targets. Multiple instances of this option may be specified; the variables will be printed one per line, with a blank line for each null or undefined variable. If <em>variable<\/em> contains a \u2018$\u2019 then the value will be expanded before printing.<\/p><\/blockquote>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0441\u043f\u0438\u0441\u043e\u043a \u0446\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">bmake V '$(.ALLTARGETS)'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 &#171;\u043f\u0441\u0435\u0432\u0434\u043e\u0446\u0435\u043b\u0438&#187; (<code>.WAIT<\/code>), \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430\u0434\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">bmake -V '$(.ALLTARGETS:N.WAIT_*:O)'<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"rekomendacii\">\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u043e, \u0440\u0430\u0434\u0438 \u0447\u0435\u0433\u043e \u0432\u0441\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0438 \u0431\u044b\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c \u043d\u0435 \u0434\u0430\u0441\u0442 \u0441\u0442\u043e\u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u043e\u0439 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0447\u0442\u043e \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 <em>CLion<\/em>, \u043d\u043e, \u0432\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0437\u0438\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u044c \u0441\u043e\u0432\u0435\u0442\u043e\u0432 \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <em>Make<\/em>. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043b\u043e, \u0441\u043e\u0441\u043b\u0430\u0432\u0448\u0438\u0441\u044c \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e \u041f\u0438\u0442\u0435\u0440\u0430 \u041c\u0438\u043b\u043b\u0435\u0440\u0430 &#171;Recursive Make Considered Harmful&#187; (<a href=\"https:\/\/accu.org\/journals\/overload\/14\/71\/miller_2004\/\" rel=\"nofollow noopener noreferrer\">HTML<\/a>, <a href=\"https:\/\/web.archive.org\/web\/20070205211740\/http:\/\/aegis.sourceforge.net\/auug97.pdf\" rel=\"nofollow noopener noreferrer\">PDF<\/a>). \u041d\u0430 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 <em>GNU Autotools<\/em>, \u0442\u0430\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e <em>Make<\/em>, \u0442\u0430\u043a \u0447\u0442\u043e \u0437\u043b\u043e \u044d\u0442\u043e \u0445\u043e\u0442\u044c \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435, \u043d\u043e, \u0443\u0432\u044b, \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e\u0435. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043a\u0430\u043a \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0438, \u0435\u0441\u0442\u044c \u0438 <a href=\"https:\/\/www.microsoft.com\/en-us\/research\/wp-content\/uploads\/2016\/03\/hadrian.pdf\" rel=\"nofollow noopener noreferrer\">\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043d\u0430 \u0432\u0435\u0449\u0438<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c.<\/p>\n<p>  <\/p>\n<ol>\n<li>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u0430\u043a\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f (\u0432 \u0442\u043e\u043c \u0436\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0438 \u0442\u0435\u043c \u0436\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <em>CLion<\/em>). \u0423\u0441\u043b\u043e\u0432\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0432\u044b\u0431\u0440\u0430\u043d\u044b WSL \u0438 GCC, \u0442\u043e \u043a\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c GCC. \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 <code>configure<\/code> (\u0434\u043b\u044f <em>GNU Autotools<\/em>) \u2014 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u043e\u0438\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435, <em>\u0434\u043e<\/em> \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 <em>CLion<\/em>.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/www.gnu.org\/software\/make\/\" rel=\"nofollow noopener noreferrer\"><em>GNU Make<\/em><\/a>. \u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043f\u0443\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u043a \u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0443 \u0432\u044b\u0431\u0440\u0430\u043d \u0443 \u0432\u0430\u0441 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445. <a href=\"https:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/utilities\/make.html\" rel=\"nofollow noopener noreferrer\"><em>POSIX Make<\/em><\/a>, <a href=\"https:\/\/www.crufty.net\/help\/sjg\/bmake.html\" rel=\"nofollow noopener noreferrer\"><em>BSD Make<\/em><\/a>, <a href=\"http:\/\/docs.embarcadero.com\/products\/rad_studio\/radstudio2007\/RS2007_helpupdates\/HUpdate4\/EN\/html\/devwin32\/make_xml.html\" rel=\"nofollow noopener noreferrer\"><em>Borland Make<\/em><\/a> \u0438 <a href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/build\/reference\/nmake-reference\" rel=\"nofollow noopener noreferrer\"><em>Microsoft NMake<\/em><\/a> \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 <code>Makefile<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b <em>Make<\/em>, \u0432 \u043a\u043e\u0434\u0435 <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/Recipes.html\" rel=\"nofollow noopener noreferrer\"><em>\u0440\u0435\u0446\u0435\u043f\u0442\u0430<\/em><\/a> (\u0442. \u0435. \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u043e\u0439 \u043d\u0430\u0431\u043e\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0446\u0435\u043b\u0438) \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/MAKE-Variable.html\" rel=\"nofollow noopener noreferrer\"><code>$(MAKE)<\/code><\/a> \u0432\u043c\u0435\u0441\u0442\u043e <code>make<\/code>. \u0422\u043e\u043c\u0443 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 <em>CLion<\/em>: \u0443 \u043a\u043e\u0433\u043e-\u0442\u043e \u0438\u0437 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <em>Make<\/em> \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <code>PATH<\/code> \u0438\u043b\u0438 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043a\u0430\u043a <code>gmake<\/code> \u0438\u043b\u0438 <code>bmake<\/code>. \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044f <code>$(MAKE)<\/code>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 <em>Make<\/em> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0439 \u0444\u0430\u0439\u043b (\u043d\u0430\u043f\u0440., <code>\/usr\/bin\/make<\/code>), \u0442. \u0435., \u0441\u043a\u0430\u0436\u0435\u043c, <em>GNU Make<\/em> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u0440\u043e\u0434\u0438\u0442 <em>BSD Make<\/em>, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 \u043f\u0440\u0435\u0441\u043b\u043e\u0432\u0443\u0442\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 &#171;dry run&#187;, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u043c \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043f\u0435\u0440\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u0430 \u043a\u0430\u043a \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0441 \u043f\u0435\u0447\u0430\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043d\u0435\u0442. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>Makefile<\/code><\/li>\n<li><code>foo\/<\/code><br \/> \n<ul>\n<li><code>Makefile<\/code><\/li>\n<li><code>foo.c<\/code><\/li>\n<\/ul>\n<\/li>\n<li><code>bar\/<\/code><br \/> \n<ul>\n<li><code>Makefile<\/code><\/li>\n<li><code>bar.c<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 <em>Make<\/em>. \u041f\u0435\u0440\u0432\u044b\u0439, \u0447\u0435\u0440\u0435\u0437 <code>$(MAKE)<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">make: Entering directory '\/home\/alice' make -C foo all make[1]: Entering directory '\/home\/alice\/foo' echo \"Making all in foo...\" gcc -c -o foo.o foo.c make[1]: Leaving directory '\/home\/alice\/foo' make -C bar all make[1]: Entering directory '\/home\/alice\/bar' echo \"Making all in bar...\" gcc -c -o bar.o bar.c make[1]: Leaving directory '\/home\/alice\/bar' make: Leaving directory '\/home\/alice'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c <code>make<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">make: Entering directory '\/home\/alice' make -C foo all make -C bar all make: Leaving directory '\/home\/alice'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0438\u0437 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 (\u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445) <code>Makefile<\/code>&#8216;\u043e\u0432 \u0431\u044b\u043b \u0441\u0442\u043e\u043b\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043c\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0443\u0432\u0438\u0434\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0440\u043e\u0432\u043d\u043e \u0432 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u044e\u0430\u043d\u0441\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u0440\u0435\u0434\u043e\u0439 <em>CLion<\/em> \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 <em>BSD Make<\/em>: \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, <code>bmake -wnk<\/code> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0451\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0444\u043e\u0440\u043c\u044b \u0437\u0430\u043f\u0438\u0441\u0438. \u0421\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e <em>GNU Make<\/em> \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 &#171;dry-run&#187; (<code>-n<\/code>) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f <code>$(MAKE)<\/code> \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <code>execve()<\/code> (\u0442\u043e\u0436\u0435 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c <code>-n<\/code>, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f), \u0430 \u0432\u043e\u0442 <em>BSD Make<\/em> \u2014 \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0435\u0442 (\u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>strace<\/code> \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <code>-f<\/code>):<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ strace -f -e execve make -wnk 2>&amp;1 >\/dev\/null | grep -vF ENOENT | grep -F execve execve(\"\/usr\/bin\/make\", [\"make\", \"-wnk\"], 0x7ffe8a5a35a0 \/* 80 vars *\/) = 0 [pid 15729] execve(\"\/usr\/bin\/make\", [\"make\", \"-C\", \"foo\", \"all\"], 0x5608f4544a30 \/* 84 vars *\/) = 0 [pid 15730] execve(\"\/usr\/bin\/make\", [\"make\", \"-C\", \"bar\", \"all\"], 0x5608f4544a30 \/* 84 vars *\/) = 0  $ strace -f -e execve bmake -wnk 2>&amp;1 >\/dev\/null | grep -vF ENOENT | grep -F execve execve(\"\/usr\/bin\/bmake\", [\"bmake\", \"-wnk\"], 0x7ffc10221bb0 \/* 80 vars *\/) = 0<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u041d\u0435 &#171;\u0437\u0430\u0448\u0438\u0432\u0430\u0439\u0442\u0435&#187; \u0432 \u0432\u0430\u0448 <code>Makefile<\/code> \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u043d\u0435\u043c\u0443, \u043a\u0430\u043a, \u043d\u0430\u043f\u0440., <code>gcc<\/code> \u0438\u043b\u0438 <code>\/usr\/bin\/clang++<\/code>. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 <code>$(CC)<\/code> \u0438 <code>$(CXX)<\/code>. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 <em>CLion<\/em> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0431\u043e\u0440\u0443 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (&#171;<a href=\"https:\/\/www.jetbrains.com\/help\/clion\/how-to-create-toolchain-in-clion.html\" rel=\"nofollow noopener noreferrer\">toolchain<\/a>&#171;), \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0440\u043e\u0432\u043d\u043e \u0442\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b C \u0438 C++, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u0443 \u0432\u0430\u0441 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043f\u043e\u043b\u0435 &#171;<em>Toolchain<\/em>&#171;). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u0441 GCC \u043d\u0430 Clang \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u043b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0441 \u0442\u043e\u0439 \u043b\u0438\u0448\u044c \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439, \u0447\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0438 \u0444\u0430\u0437\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u0438 \u0441\u0431\u043e\u0440\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">foo.o: foo.c     cc -c -o $@ $&lt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">foo.o: foo.c     $(CC) -c -o $@ $&lt;<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0444\u043b\u0430\u0433\u0438 <code>w<\/code>, <code>n<\/code> \u0438 <code>k<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435 \u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u044d\u0442\u0438\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c <code>MFLAGS<\/code>, <code>MAKEFLAGS<\/code> \u0438\u043b\u0438 <code>GNUMAKEFLAGS<\/code>. \u041f\u043b\u043e\u0445\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 <code>w<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">GNUMAKEFLAGS += --no-print-directory<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 &#171;\u0447\u0443\u0436\u0438\u043c&#187; \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u043a\u0443\u0434\u0430 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c (\u043f\u0443\u0441\u0442\u044c, \u043d\u0430\u043f\u0440., <a href=\"https:\/\/github.com\/nodejs\/node\/commit\/ad7b98baa84172d1c6de1ed0a06be6aad9f6f3db\" rel=\"nofollow noopener noreferrer\">Node.js<\/a>), \u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b VCS, \u043c\u043e\u0436\u043d\u043e \u0434\u043b\u044f \u0444\u0430\u0437\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0444\u043b\u0430\u0433 <code>e<\/code>:<\/p>\n<p>  <\/p>\n<blockquote><p><strong>-e, &#8212;environment-overrides<\/strong><\/p>\n<p>  Give variables taken from the environment precedence over variables from makefiles.<\/p><\/blockquote>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f Node.js:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yr\/up\/ao\/yrupaofizqbtoltzs8nbgvtilaw.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yr\/up\/ao\/yrupaofizqbtoltzs8nbgvtilaw.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0433\u0430 <code>e<\/code> \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u0435 &#171;<em>Arguments<\/em>&#187; \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0438 \u0432 \u0438\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <code>Makefile<\/code> \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0444\u043b\u0430\u0433\u0438 <em>Make<\/em> \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (\u0441\u043c. \u043d\u0438\u0436\u0435).<\/p>\n<p>  <\/li>\n<li>\n<p>\u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 (<code>make -jN<\/code> \u043f\u0440\u0438 <em>N > 1<\/em>), &#171;\u0437\u0430\u0448\u0438\u0442\u043e\u0433\u043e&#187; \u0432 <code>Makefile<\/code> \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <code>MFLAGS<\/code>, <code>MAKEFLAGS<\/code> \u0438\u043b\u0438 <code>GNUMAKEFLAGS<\/code> (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/Options_002fRecursion.html\" rel=\"nofollow noopener noreferrer\"><code>5.7.3 Communicating Options to a Sub-make<\/code><\/a>):<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">MAKEFLAGS += j8  .PHONY: all all: foo-all bar-all  .PHONY: foo-all foo-all:     $(MAKE) -C foo all  .PHONY: bar-all bar-all:     $(MAKE) -C bar all<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 <em>Make<\/em> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e (\u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u2014 8) \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e \u0432 \u0432\u044b\u0432\u043e\u0434\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0430 &#171;Entering directory &#8216;&#8230;'&#187; \u0438 &#171;Leaving directory &#8216;&#8230;'&#187; \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u2014 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438, \u0438 <em>CLion<\/em> \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u043d\u0438 \u0441\u043c\u0435\u043d\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0442\u043e\u043c\u0443 \u0438\u043b\u0438 \u0438\u043d\u043e\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">make: Entering directory '\/home\/alice' make -C foo all make -C bar all make[1]: Entering directory '\/home\/alice\/foo' make[1]: Entering directory '\/home\/alice\/bar' echo \"Making all in foo...\" make[1]: Leaving directory '\/home\/alice\/foo' echo \"Making all in bar...\" make[1]: Leaving directory '\/home\/alice\/bar' make: Leaving directory '\/home\/alice'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u0443\u0447\u0451\u0442\u043e\u043c \u0432\u044b\u0448\u0435\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432 <em>Make<\/em>, \u043f\u0435\u0440\u0435\u0434\u0430\u0439\u0442\u0435 \u0444\u043b\u0430\u0433 <code>-j<\/code> \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u0435 &#171;<em>Build options<\/em>&#187; \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u043d\u043e \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u0435 &#171;<em>Arguments<\/em>&#187; \u2014 \u0444\u043b\u0430\u0433\u0438 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u043e \u043d\u0435 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438):<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ay\/h8\/zw\/ayh8zwswrteceguvfs3gk_hzc9y.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ay\/h8\/zw\/ayh8zwswrteceguvfs3gk_hzc9y.png\"\/><\/p>\n<p>  <\/li>\n<li>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 <em>Make<\/em>, \u043d\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0439\u0442\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 (<code>LC_*<\/code>, <code>LANG<\/code>, <code>LANGUAGE<\/code>) \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0430\u0448\u0438\u0445 <code>Makefile<\/code>&#8216;\u043e\u0432 \u0438\/\u0438\u043b\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0441\u0431\u043e\u0440\u043a\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <em>CLion<\/em>, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e \u0441\u043c\u0435\u043d\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u044d\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435 (\u0438 \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 <em>Make<\/em>). \u0412\u043e\u0442 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u043c\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">export LC_ALL = ru_RU.UTF-8 export LANG = ru_RU.UTF-8  .PHONY: all all: foo-all bar-all  .PHONY: foo-all foo-all:     $(MAKE) -C foo all  .PHONY: bar-all bar-all:     $(MAKE) -C bar all<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>make -wnk<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">make: Entering directory '\/home\/alice' make -C foo all make[1]: \u0432\u0445\u043e\u0434 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u00ab\/home\/alice\/foo\u00bb echo \"Making all in foo...\" make[1]: \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u00ab\/home\/alice\/foo\u00bb make -C bar all make[1]: \u0432\u0445\u043e\u0434 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u00ab\/home\/alice\/bar\u00bb echo \"Making all in bar...\" make[1]: \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u00ab\/home\/alice\/bar\u00bb make: Leaving directory '\/home\/alice'<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 <em>Make<\/em>, \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u044b<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">target:     cd subdir &amp;&amp; $(MAKE) target<\/code><\/pre>\n<p>  <\/p>\n<p>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0443<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">target:     $(MAKE) -C subdir target<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 <em>Make<\/em> (&#171;Entering directory&#187;, &#171;Leaving directory&#187;), <em>CLion<\/em>, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>cd<\/code> \u0438 \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442 \u0441\u043c\u0435\u043d\u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u043d\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0430\u0434\u0451\u0436\u043d\u0435\u0435.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/Foreach-Function.html\" rel=\"nofollow noopener noreferrer\"><code>$(foreach)<\/code><\/a> \u0432\u043c\u0435\u0441\u0442\u043e \u0446\u0438\u043a\u043b\u043e\u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 POSIX (<code>for ... do ... done<\/code> \u0438\u043b\u0438 <code>while ... do ... done<\/code>). \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li><code>Makefile<\/code><\/li>\n<li><code>foo\/<\/code><br \/> \n<ul>\n<li><code>Makefile<\/code><\/li>\n<\/ul>\n<\/li>\n<li><code>bar\/<\/code><br \/> \n<ul>\n<li><code>Makefile<\/code><\/li>\n<\/ul>\n<\/li>\n<li><code>baz\/<\/code><br \/> \n<ul>\n<li><code>Makefile<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u043c <code>Makefile<\/code>&#8216;\u043e\u043c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">all-recursive:     for subdir in foo bar baz; \\     do (cd $$subdir; $(MAKE) all) || exit 1; done<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0440\u0435\u0446\u0435\u043f\u0442 \u0446\u0435\u043b\u0438 <code>all-recursive<\/code> \u2014 \u044d\u0442\u043e \u0446\u0438\u043a\u043b \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 POSIX, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 &#171;dry run&#187;. \u0415\u0441\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <code>$(foreach)<\/code>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">all-recursive:     $(foreach subdir,$(SUBDIRS),$(MAKE) -C $(subdir) all;)<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <em>\u043c\u0430\u0441\u043a\u0438<\/em> (wildcards) \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/Wildcard-Function.html\" rel=\"nofollow noopener noreferrer\"><code>$(wildcard)<\/code><\/a>. \u0412\u043e\u0442 \u0442\u0430\u043a \u043f\u043b\u043e\u0445\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">all:     $(CC) -c *.c<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0441 <code>Makefile<\/code>&#8216;\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0430\u0439\u043b\u044b <code>foo.c<\/code> \u0438 <code>bar.c<\/code>, \u0442\u043e \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>make -wnk<\/code> \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0432\u044b\u0432\u0435\u0434\u0435\u0442<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cc -c *.c<\/code><\/pre>\n<p>  <\/p>\n<p>\u0430 <em>CLion<\/em> \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u043c\u0430\u0441\u043a\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 (\u043a \u0442\u043e\u043c\u0443 \u0436\u0435, \u043d\u0430 UNIX \u0438 Windows \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 \u0440\u0430\u0437\u043d\u044b\u0435 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043c\u0430\u0441\u043e\u043a \u0441\u043b\u0435\u0433\u043a\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u0435\u043d). \u0412\u043e\u0442 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">all:     $(CC) -c $(wildcard *.c)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u0430\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <em>Make<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">cc -c foo.c bar.c<\/code><\/pre>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  <\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 <em>\u0440\u0435\u0446\u0435\u043f\u0442\u0430<\/em> \u0446\u0435\u043b\u0438 \u0432\u043e <em>\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435<\/em> (\u043f\u043e-\u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438 \u044d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f &#171;<a href=\"https:\/\/en.wikiversity.org\/wiki\/Bash_programming\/Subshells\" rel=\"nofollow noopener noreferrer\">subshell<\/a>&#171;), \u0438 \u044d\u0442\u043e\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e <em>\u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438<\/em> (\u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u0432\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435, \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u0430 \u0441\u0440\u0435\u0434\u043e\u0439 <em>CLion<\/em>), \u0442\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 POSIX \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 <em>Make<\/em>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <a href=\"https:\/\/www.gnu.org\/software\/make\/manual\/html_node\/Shell-Function.html\" rel=\"nofollow noopener noreferrer\"><code>$(shell)<\/code><\/a>, \u0430 \u043d\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 (<code>$(\u043a\u043e\u043c\u0430\u043d\u0434\u0430)<\/code> \u0438\u043b\u0438 <code>`\u043a\u043e\u043c\u0430\u043d\u0434\u0430`<\/code>). \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">main.o: main.cpp     $(CXX) -I..\/ -g -Wall $(shell pkg-config some-library) -c -o $@ $&lt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0442\u0430\u043a\u043e\u0439 \u2014 \u043d\u0435\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">main.o: main.cpp     $(CXX) -I..\/ -g -Wall `pkg-config some-library` -c -o $@ $&lt;     $(CXX) -I..\/ -g -Wall $$(pkg-config some-library) -c -o $@ $&lt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e <em>CLion<\/em>, \u0437\u0430 \u0432\u044b\u0447\u0435\u0442\u043e\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 (\u043d\u0430\u043f\u0440., <a href=\"https:\/\/www.gnu.org\/software\/automake\/manual\/html_node\/VPATH-Builds.html\" rel=\"nofollow noopener noreferrer\"><code>VPATH<\/code><\/a>-\u0441\u0431\u043e\u0440\u043a\u0438 \u0432 <em>GNU Autotools<\/em>), \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <em>\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443<\/em>.<\/p>\n<p>  <\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u0431\u044b\u043b \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u0435\u043d. \u0415\u0441\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u044e\u0430\u043d\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c <code>Makefile<\/code>-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 (\u0430 \u0438\u043c\u0435\u043d\u043d\u043e, \u044f\u0434\u0440\u0435 Linux), \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u2014 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/666058\/\"> https:\/\/habr.com\/ru\/post\/666058\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0417\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: &#171;\u043c\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0440\u0435\u0434\u0435 CLion&#187;. \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u043e \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437 \u0440\u0430\u0437\u0430 \u0432 \u0440\u0430\u0437 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c \u043b\u044e\u0434\u044f\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435. \u0421\u0442\u0430\u0442\u044c\u044f \u0438\u043c\u0435\u0435\u0442 \u0446\u0435\u043b\u044c\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u0442 \u043e\u043f\u044b\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <a href=\"https:\/\/www.jetbrains.com\/help\/clion\/makefiles-support.html\" rel=\"nofollow noopener noreferrer\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0432\u0430\u043c \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430 \u0438 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-333206","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=333206"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333206\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=333206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=333206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}