From patchwork Tue Oct 31 18:05:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Levinson X-Patchwork-Id: 5791 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp4305514jah; Tue, 31 Oct 2017 11:05:28 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Q0Av5j8/tv1BKy4NtCW1DoJoKbmOs7mQn2zO2iOzWl+O38mwsngEsMayYVkBXcxJOMEeNu X-Received: by 10.223.183.75 with SMTP id n11mr2782918wre.185.1509473128911; Tue, 31 Oct 2017 11:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509473128; cv=none; d=google.com; s=arc-20160816; b=Rsx73TwXuhRYi2fWb86rIF0kNEmmUurCmc9gLa+vdeTqgui5w90muIoA3PF2Ub3e1w x/OR7yhWmWkTBl1nuZX7WRCXRpTcKgq9DZR07UiNSY8fYx0Y8+NtCMz4qj2Js7f7/Fm/ S/s/HMVnkQFs7hSsAkwr42KVqeUQkEJsHJAQ2K0+XqXiDG4CGKnpA9IvOwft/zdU5FdH I3BBJstlsqEFNpQPMnr1DRXaK7ehGqDnvTlK6Vy9qODJjOB3GxDtw0UuvRXX9Uw4G5U2 XIwIMjAh1px1wf79DFy31CTSPFwNeV0OKlG7W9FqtwcePkuQlW19RkLjhiiGV2RLPnCh Tunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:content-language:mime-version:user-agent:date :message-id:from:to:dkim-signature:delivered-to :arc-authentication-results; bh=XvS/9t4WwVvNpvzduqxno02+Row2h+ckocblh8ECrvA=; b=W1iRUZCTVR8KLhXe7fLBHLQaHe1eNqXKLTytkNjxjowBMoTnzrdh1vMUwCvl/heqYi RW0eCiUiQ3CqCjUdG4muHt1CCgt6WvtLP8c+LhkegYCsE6sWajengG6qL/RmwcUm7frZ fc0/AvRasuH0h1dtIijbwgjpy8t3BpgiR9VD+ly8NbXEO6upRQmAz114tUqTqPxfQPEr 2WDbuEvC2OmNv/Fh8MCMOES1KZNOL+x5ONIlGNjjbpBF+J8GoPDlnpYOc1S5N6dbwd2H HLe480J/DkaWUr6WTGFe0GfGEqRbmYUPXO6Nw+cHornRH+czmxw+K1U11w7B/lIDrOHB Rj/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@levland.net header.s=default header.b=QPQ+I21f; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d15si2113211wre.211.2017.10.31.11.05.28; Tue, 31 Oct 2017 11:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@levland.net header.s=default header.b=QPQ+I21f; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A7BA2689828; Tue, 31 Oct 2017 20:05:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from torch.lunarmania.com (torch.lunarmania.com [67.210.111.70]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AE356689744 for ; Tue, 31 Oct 2017 20:05:11 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=levland.net ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Date: Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6B+Ts3jjPf9P4ETkIVNAhGoagJgPaj8zdMzhaiMbG+k=; b=QPQ+I21ftHJCL3s+HWTQ0tms+7 2zq9yR3zrvqTU8OuyPTjtAxcKaUo7Q7bXEFf4dif0WrPlMp5Imh0gVC3+Yd4decj6iTR1f+x+eGHh xUf/ZMkrt6KwJkp/vlX5DTZGTuJV/otVjmD7GrwN84UxsivDv7W+L04joj8z6gYnzUj9Asu2kLruC eaoAOUlxucHyx9pD3FSijesibGL7jNlbRjRPst2BBh2Qty1+O0cBm+wLaw/rR4YZidkxkLUCxGo42 Y5HtXCxDEUSd8nduk10wYWbVyD1Q71PHGoBTYBPUIWphPEswBygVGmYvs+D1+T0pyHaBak2n+D2+N 4JLsoL+A==; Received: from 184-100-168-92.ptld.qwest.net ([184.100.168.92]:64897 helo=[192.168.3.100]) by torch.lunarmania.com with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1e9aub-0001FP-1j for ffmpeg-devel@ffmpeg.org; Tue, 31 Oct 2017 11:05:17 -0700 To: FFmpeg development discussions and patches From: Aaron Levinson Message-ID: <9db79101-4675-a28d-1ded-fcd2ddaabc1a@levland.net> Date: Tue, 31 Oct 2017 11:05:18 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Language: en-US X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - torch.lunarmania.com X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - levland.net X-Get-Message-Sender-Via: torch.lunarmania.com: authenticated_id: alevinsn_dev@levland.net X-Authenticated-Sender: torch.lunarmania.com: alevinsn_dev@levland.net Subject: [FFmpeg-devel] [PATCH] configure, fftools/Makefile: Copy .pdb files to bindir for MSVC builds for make install X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" When ffmpeg is built using MSVC, symbols are stored separately from executables and libraries in .pdb files. However, unlike with gcc-based builds, when make install is invoked, symbols, in the form of .pdb files, which are important for debugging, are not copied to bindir. This change corrects this deficiency for MSVC builds. Files are also uninstalled appropriately when make uninstall is exercised. Note: General idea for how to properly handle the copying of PDB files associated with programs suggested by Hendrik Leppkes. Comments: -- configure: a) Leverage already existing SLIB_INSTALL_EXTRA_SHLIB facility (which is already pretty specific to Windows) to add .pdb files, in addition to .lib files, for shared libraries to bindir during make install. b) Add PROG_INSTALL_EXTRA_BIN variable for MSVC builds and also add it to the section that causes it to be added to config.mak. This is used in Makefile to copy any additional files associated with programs. For MSVC, it is used to copy the pdb files associated with any executables that are built. Note that such executables are build with _g in the file name and are later copied to a filename without _g in the file name. As such, the PDB files have _g in the file name. -- fftools/Makefile: Enhance install-progs and uninstall-progs targets to handle PROG_INSTALL_EXTRA_BIN if defined. It uses a similar procedure as already in place for SLIB_INSTALL_EXTRA_SHLIB in library.mak. Signed-off-by: Aaron Levinson --- configure | 4 +++- fftools/Makefile | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 2ac6fed98a..feb86b2069 100755 --- a/configure +++ b/configure @@ -5101,9 +5101,10 @@ case $target_os in SLIB_CREATE_DEF_CMD='$(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)' SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' SLIB_INSTALL_LINKS= - SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' + SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.pdb)' SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) -implib:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' + PROG_INSTALL_EXTRA_BIN='$(AVPROGS-yes:%=%$(PROGSSUF)_g.pdb)' enabled x86_64 && objformat="win64" || objformat="win32" ranlib=: enable dos_paths @@ -7034,6 +7035,7 @@ SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME} SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS} SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB} SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB} +PROG_INSTALL_EXTRA_BIN=${PROG_INSTALL_EXTRA_BIN} VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD} SAMPLES:=${samples:-\$(FATE_SAMPLES)} NOREDZONE_FLAGS=$noredzone_flags diff --git a/fftools/Makefile b/fftools/Makefile index c867814a71..8c121b9762 100644 --- a/fftools/Makefile +++ b/fftools/Makefile @@ -47,11 +47,13 @@ install-progs-$(CONFIG_SHARED): install-libs install-progs: install-progs-yes $(AVPROGS) $(Q)mkdir -p "$(BINDIR)" $(INSTALL) -c -m 755 $(AVPROGS) "$(BINDIR)" + $(if $(PROG_INSTALL_EXTRA_BIN), $(INSTALL) -m 644 $(PROG_INSTALL_EXTRA_BIN) "$(BINDIR)") uninstall: uninstall-progs uninstall-progs: $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS)) + $(if $(PROG_INSTALL_EXTRA_BIN), $(RM) $(addprefix "$(BINDIR)/", $(PROG_INSTALL_EXTRA_BIN))) clean:: $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G) $(CLEANSUFFIXES:%=fftools/%)