From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id DB6BB6C7D3; Fri, 5 Feb 2021 01:53:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DB6BB6C7D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612479235; bh=7lZjPcqa1LZnvBSako5OFpanaIwwGRQ+/FNBit23/Xg=; h=To:Cc:References:In-Reply-To:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=DvQXmiHHuz18gbBkcRG4lGB1+YkeKq6iCYaKTlQN4hCAYbFUxlN2HCPCflV4SmT5F 7KRvKX9xbvSGjE9Opvh+2COyOyHacYPaXONFYcX504g572aFyEmRn6VCTXkePuwFQ1 cx1+RIsnJDuZ9rX5oboiY9n6FMMlftMMbdJYNaFQ= Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A6BDE6C7D3 for ; Fri, 5 Feb 2021 01:53:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A6BDE6C7D3 Received: by smtp61.i.mail.ru with esmtpa (envelope-from ) id 1l7nVW-0003o1-KR; Fri, 05 Feb 2021 01:53:51 +0300 To: "'Igor Munkin'" , "'Sergey Kaplun'" Cc: References: In-Reply-To: Date: Fri, 5 Feb 2021 01:53:45 +0300 Message-ID: <11bc01d6fb48$97aa3620$c6fea260$@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJPfenCWrjRxS0krGRZARdqgOlJ3gLgsxUzqUCOZbA= Content-Language: ru X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9C4647521586BE7E637AB8B70F7375365A182A05F538085040ADD90FAB4265B8CFE5BEF6EDF4CFD3A858F3685B69621E7D25A34C60A012C2E7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C4470ABEE4BC4B50EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F63E14183F8C6AF98638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC0302E880A7698C90837919C9015078445D7E8826736BCC34389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C078FCF50C7EAF9C588941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E5E764EB5D94DBD4CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C224934143DAF28A1E3E73AA81AA40904B5D9CF19DD082D7633A078D18283394535A93AA81AA40904B5D98AA50765F790063751898D81C3DCE054EC76A7562686271EEC990983EF5C032935872C767BF85DA29E625A9149C048EEB89ED3C7A62817816D8C47C27EEC5E9FC8A9BA7A39EFB7666BA297DBC24807EA089D37D7C0E48F6C8AA50765F7900637C69D4C8FA58DAC3AEFF80C71ABB335746BA297DBC24807EA27F269C8F02392CDC58410348177836EABEDDA51113D120200306258E7E6ABB4E4A6367B16DE6309 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46DB8BFD0D7320186DA355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A5F184A6208819E8CB61618D5975C04DA41DE92F13ECC1767AD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34351729636A02D1DED5A4038C18DC6881BC4C49BAEB59FA209099F116339FCA849293D1026D10264F1D7E09C32AA3244C3EECC998B1E7D12B20689BEF57CFDFB6A95CA90A1D8AC565FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj9Cv0SAP7uQUEGkg1XYVvKQ== X-Mailru-Sender: 6CA451E36783D721CBEA96CEA26D325DAD5C7820CF42B53332F03BEB92E39A2EB7CBEF92542CD7C82F97C478340294DCC77752E0C033A69E0F0C7111264B8915FF1320A92A5534336C18EFA0BB12DBB0 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/5] build: preserve the original build system X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Timur Safin via Tarantool-patches Reply-To: Timur Safin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" LGTM as rather simple rename (with few touches here and there)! : From: Igor Munkin : Subject: [PATCH luajit 1/5] build: preserve the original build system :=20 : Since the build machinery is going to be ported to CMake there would = be : Makefile names clashing. This change renames the original build system : (and a couple of auxiliary files requiring configuring) to keep all = this : machinery working. :=20 : As a result of these changes one need to explicitly specify the = Makefile : in the build command: : | make -f Makefile.original :=20 : Needed for tarantool/tarantool#4862 :=20 : Signed-off-by: Igor Munkin : --- : Makefile =3D> Makefile.original | 44 = +++++++++++++-------- : etc/{luajit.pc =3D> luajit.pc.in} | 4 +- : src/{Makefile.dep =3D> Makefile.dep.original} | 0 : src/{Makefile =3D> Makefile.original} | 4 +- : tools/luajit-parse-memprof | 9 ----- : tools/luajit-parse-memprof.in | 6 +++ : 6 files changed, 38 insertions(+), 29 deletions(-) : rename Makefile =3D> Makefile.original (85%) : rename etc/{luajit.pc =3D> luajit.pc.in} (91%) : rename src/{Makefile.dep =3D> Makefile.dep.original} (100%) : rename src/{Makefile =3D> Makefile.original} (99%) : delete mode 100755 tools/luajit-parse-memprof : create mode 100644 tools/luajit-parse-memprof.in :=20 : diff --git a/Makefile b/Makefile.original : similarity index 85% : rename from Makefile : rename to Makefile.original : index 61967df..b85d4bf 100644 : --- a/Makefile : +++ b/Makefile.original : @@ -85,10 +85,10 @@ INSTALL_X=3D install -m 0755 : INSTALL_F=3D install -m 0644 : UNINSTALL=3D $(RM) : LDCONFIG=3D ldconfig -n : -SED_PC=3D sed -e "s|^prefix=3D.*|prefix=3D$(PREFIX)|" \ : - -e "s|^multilib=3D.*|multilib=3D$(MULTILIB)|" : -SED_TMEMPROF=3D sed -e = "s|^TOOL_DIR=3D.*|TOOL_DIR=3D$(INSTALL_TOOLSLIB)|" \ : - -e "s|^LUAJIT_BIN=3D.*|LUAJIT_BIN=3D$(INSTALL_T)|" : +SED_PC=3D sed -e "s|@LUAJIT_PC_PREFIX@|$(PREFIX)|" \ : + -e "s|@LUAJIT_PC_MULTILIB@|$(MULTILIB)|" : +SED_TMEMPROF=3D sed -e "s|@LUAJIT_TOOLS_DIR@|$(INSTALL_TOOLSLIB)|" \ : + -e "s|@LUAJIT_TOOLS_BIN@|$(INSTALL_T)|" :=20 : FILE_T=3D luajit : FILE_A=3D libluajit.a : @@ -123,9 +123,9 @@ endif :=20 : INSTALL_DEP=3D src/luajit :=20 : -default all $(INSTALL_DEP): : +default all $(INSTALL_DEP): tools : @echo "=3D=3D=3D=3D Building LuaJIT $(VERSION) =3D=3D=3D=3D" : - $(MAKE) -C src : + $(MAKE) -C src -f Makefile.original : @echo "=3D=3D=3D=3D Successfully built LuaJIT $(VERSION) = =3D=3D=3D=3D" :=20 : install: $(INSTALL_DEP) : @@ -140,17 +140,17 @@ install: $(INSTALL_DEP) : $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \ : $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : : cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN) : - cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \ : - $(INSTALL_F) $(FILE_PC).tmp $(INSTALL_PC) && \ : - $(RM) $(FILE_PC).tmp : + cd etc && $(SED_PC) $(FILE_PC).in > $(FILE_PC) && \ : + $(INSTALL_F) $(FILE_PC) $(INSTALL_PC) && \ : + $(RM) $(FILE_PC) : cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC) : cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB) : cd tools/utils && $(INSTALL_F) $(FILES_UTILSLIB) $(INSTALL_UTILSLIB) : cd tools/memprof && $(INSTALL_F) $(FILES_MEMPROFLIB) : $(INSTALL_MEMPROFLIB) : cd tools && $(INSTALL_F) $(FILES_TOOLSLIB) $(INSTALL_TOOLSLIB) : - cd tools && $(SED_TMEMPROF) $(FILE_TMEMPROF) > $(FILE_TMEMPROF).tmp = && : \ : - $(INSTALL_X) $(FILE_TMEMPROF).tmp $(INSTALL_TMEMPROF) && \ : - $(RM) $(FILE_TMEMPROF).tmp : + cd tools && $(SED_TMEMPROF) $(FILE_TMEMPROF).in > $(FILE_TMEMPROF) = && : \ : + $(INSTALL_X) $(FILE_TMEMPROF) $(INSTALL_TMEMPROF) && \ : + $(RM) $(FILE_TMEMPROF) : @echo "=3D=3D=3D=3D Successfully installed LuaJIT $(VERSION) to = $(PREFIX) : =3D=3D=3D=3D" : @echo "" : @echo "Note: the development releases deliberately do NOT install a : symlink for luajit" : @@ -185,13 +185,25 @@ uninstall: :=20 :=20 : = #########################################################################= ### : ## :=20 : -amalg: : +amalg: tools : @echo "Building LuaJIT $(VERSION)" : - $(MAKE) -C src amalg : + $(MAKE) -C src -f Makefile.original amalg :=20 : clean: : - $(MAKE) -C src clean : + $(RM) tools/$(FILE_TMEMPROF) : + $(MAKE) -C src -f Makefile.original clean :=20 : -.PHONY: all install amalg clean : +tools: tools/$(FILE_TMEMPROF) : + : +# FIXME: This is an ugly hack to manually configure an auxiliary : +# tools/luajit-parse-memprof. I hope this file will have gone away : +# in scope of https://github.com/tarantool/tarantool/issues/5688. : +tools/$(FILE_TMEMPROF): : + @sed -e "s|@LUAJIT_TOOLS_DIR@|$(realpath tools)|" \ : + -e "s|@LUAJIT_TOOLS_BIN@|$(realpath src/luajit)|" \ : + $@.in > $@ : + @chmod +x $@ : + : +.PHONY: all install amalg clean tools :=20 :=20 : = #########################################################################= ### : ## : diff --git a/etc/luajit.pc b/etc/luajit.pc.in : similarity index 91% : rename from etc/luajit.pc : rename to etc/luajit.pc.in : index a78f174..f32385d 100644 : --- a/etc/luajit.pc : +++ b/etc/luajit.pc.in : @@ -5,8 +5,8 @@ relver=3D0 : version=3D${majver}.${minver}.${relver}-beta3 : abiver=3D5.1 :=20 : -prefix=3D/usr/local : -multilib=3Dlib : +prefix=3D@LUAJIT_PC_PREFIX@ : +multilib=3D@LUAJIT_PC_MULTILIB@ : exec_prefix=3D${prefix} : libdir=3D${exec_prefix}/${multilib} : libname=3Dluajit-${abiver} : diff --git a/src/Makefile.dep b/src/Makefile.dep.original : similarity index 100% : rename from src/Makefile.dep : rename to src/Makefile.dep.original : diff --git a/src/Makefile b/src/Makefile.original : similarity index 99% : rename from src/Makefile : rename to src/Makefile.original : index 825b01c..502504c 100644 : --- a/src/Makefile : +++ b/src/Makefile.original : @@ -624,7 +624,7 @@ depend: : -e "s|^\([^l ]\)|host/\1|" \ : -e "s| lj_target_\S*\.h| lj_target_*.h|g" \ : -e "s| lj_emit_\S*\.h| lj_emit_*.h|g" \ : - -e "s| lj_asm_\S*\.h| lj_asm_*.h|g" >Makefile.dep : + -e "s| lj_asm_\S*\.h| lj_asm_*.h|g" >Makefile.dep.original : @for file in $(ALL_HDRGEN); do \ : test -s $$file || $(HOST_RM) $$file; \ : done : @@ -699,7 +699,7 @@ $(HOST_O): %.o: %.c : $(E) "HOSTCC $@" : $(Q)$(HOST_CC) $(HOST_ACFLAGS) -c -o $@ $< :=20 : -include Makefile.dep : +include Makefile.dep.original :=20 :=20 : = #########################################################################= ### : ## : # Target file rules. : diff --git a/tools/luajit-parse-memprof b/tools/luajit-parse-memprof : deleted file mode 100755 : index c814301..0000000 : --- a/tools/luajit-parse-memprof : +++ /dev/null : @@ -1,9 +0,0 @@ : -#!/bin/bash : -# : -# Launcher for memprof parser. : - : -# This two variables are replaced on installing. : -TOOL_DIR=3D$(dirname `readlink -f $0`) : -LUAJIT_BIN=3D$TOOL_DIR/../src/luajit : - : -LUA_PATH=3D"$TOOL_DIR/?.lua;;" $LUAJIT_BIN $TOOL_DIR/memprof.lua $@ : diff --git a/tools/luajit-parse-memprof.in = b/tools/luajit-parse-memprof.in : new file mode 100644 : index 0000000..8867202 : --- /dev/null : +++ b/tools/luajit-parse-memprof.in : @@ -0,0 +1,6 @@ : +#!/bin/bash : +# : +# Launcher for memprof parser. : + : +LUA_PATH=3D"@LUAJIT_TOOLS_DIR@/?.lua;;" \ : + @LUAJIT_TOOLS_BIN@ @LUAJIT_TOOLS_DIR@/memprof.lua $@ : -- : 2.25.0