From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QPOmFhkZEmNueAAAbAwnHQ (envelope-from ) for ; Fri, 02 Sep 2022 16:54:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id AG63FhkZEmPVewEAauVa8A (envelope-from ) for ; Fri, 02 Sep 2022 16:54:17 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EEA15323D0 for ; Fri, 2 Sep 2022 16:54:16 +0200 (CEST) Received: from localhost ([::1]:54296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oU83k-0003pw-1p for larch@yhetil.org; Fri, 02 Sep 2022 10:54:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oU83X-0003po-4i for guix-patches@gnu.org; Fri, 02 Sep 2022 10:54:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57646) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oU83W-00044l-Ne for guix-patches@gnu.org; Fri, 02 Sep 2022 10:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oU83W-00078M-Di for guix-patches@gnu.org; Fri, 02 Sep 2022 10:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57280] [PATCH 0/3] Add documentation-files argument to emacs build system. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 02 Sep 2022 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: 57280@debbugs.gnu.org Received: via spool by 57280-submit@debbugs.gnu.org id=B57280.166213038827358 (code B ref 57280); Fri, 02 Sep 2022 14:54:02 +0000 Received: (at 57280) by debbugs.gnu.org; 2 Sep 2022 14:53:08 +0000 Received: from localhost ([127.0.0.1]:47395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oU82d-00077C-Lo for submit@debbugs.gnu.org; Fri, 02 Sep 2022 10:53:08 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:42734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oU82b-00076h-Ix for 57280@debbugs.gnu.org; Fri, 02 Sep 2022 10:53:06 -0400 Received: by mail-ej1-f65.google.com with SMTP id p16so4348320ejb.9 for <57280@debbugs.gnu.org>; Fri, 02 Sep 2022 07:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date; bh=1JQM0QPN2dBdzFvQ4Vy6yJeV0sBZHpJSm5F8H38cAkU=; b=eUjgnBOBQpQrUowhogVf1xeCEPPttpdAN6SOgvnxnWrALhIue85XZIV8T9ztjOCzhY vZjynZ57hUEEGRmioVvS22IcQ51M8iOQ52XlTaKROT6uebMVI8BbX3g1vdfUZzliZldu M4XesQnMHeTNSbxlM3u5dOKN9YsAGZxv/f60Qdnpmqw9HomC3Toe+MSQBsik43EuZvFO KQYT4Paz6c5CVjwezmJQMTOuHMDaJ/uNqs7ZIjdtfHm4aCwlhxIpZH0yYW3SFo73hzgF mOsCo/X9h0VY0fua4leAJ8emmGpByr68lDsDU/b6Y1dHniYzeGkM33yGC0gfsnak0KJJ PoMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date; bh=1JQM0QPN2dBdzFvQ4Vy6yJeV0sBZHpJSm5F8H38cAkU=; b=poLp7sK8C4uo2KwCR0FgBx5mw61VkB9navWfJ9c1ux0YQqfTt71XZRGqPCB0OjTIq3 3Kq2sjdOaOdGEPWZrnzhWux6laAkpmfEwQhrc9sm8DbwDXYalX0kv2ILAme6KFvxpIvL BpQi05pGVEGnyIW5ZGlHsT+eakyvWXbNNFkH9n+bYqdwTRh97Ma7Lukyw3IYLQ3hRJZ2 YGwc44ohu/fmLWPYsPqAsfLXRThTMHF5gMCXil1pOVwu+nVOkGusmPJNvWXi2a33CyuE Zmgl7okXpCVA5ppsRCEnSkv6+c9ApAz0sULFOkI+pDJjTxy40H5TiL8QcR31GYNqeBiK gebw== X-Gm-Message-State: ACgBeo2kHeL0g+YaGNES89gu2ljoEIS7cdv8LyKEPUN0zpIchDvgszmN i9R8mGEyQqJvusXRDHsySbs= X-Google-Smtp-Source: AA6agR7nO51W3E6C1wcUQMmYUw7kvN6w/JDDS1ImLFKMTHwF/uUBKr6C7Ag34uiOOcFWKDaBx6k42w== X-Received: by 2002:a17:907:97cd:b0:731:5d0:4434 with SMTP id js13-20020a17090797cd00b0073105d04434mr26114621ejc.603.1662130379547; Fri, 02 Sep 2022 07:52:59 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id q3-20020a056402040300b004466f5375a5sm1600633edv.53.2022.09.02.07.52.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 07:52:58 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Fri, 02 Sep 2022 16:52:57 +0200 In-Reply-To: <87czcd3md9.fsf@trop.in> References: <87v8q8u54p.fsf@trop.in> <64cd6f7171047bfe95ba9621c4616b9288b7dba9.camel@gmail.com> <87czcd3md9.fsf@trop.in> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662130457; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1JQM0QPN2dBdzFvQ4Vy6yJeV0sBZHpJSm5F8H38cAkU=; b=jYOpQulfIal1F7CAPlLuJH7cy2C6Q71DYfmH5lMD/bC6Hzt3l1urrU6yLC6ooIyvIV/bRd 9abMYrR8LbaHlJt7obYfI8WQIEdVntUJR1WglUkINjB/qY5CXbc16ODBQMkTT8kexfb8Hs AfoekxEc2kfjZG+Q8TxjcWdM8QST87jap1Au28T8DElbOsec2hUZSZHiX9yfFaH5yrRTSk LVigjqjGgts/Wxdb/hg3DyOdXhuD14wNaTMhz4ruEFo7sX7hhH1F+zAuPbfrP8r4ppqZDs q+OAhtspza1ulxIC5Vi+k4Jhrra+cNemSIfXLLYoH+XSBkvee2oqllgkKGwXig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662130457; a=rsa-sha256; cv=none; b=V0AOeFQNZeUOcolGc7L2M0fN5X3egOKP0AJvYNq09xonTb7f4zuef+lDRtMzKu3pfbGT6g oC38pPkcH0hro2z2z1MsBxH3AEStp8rQ+rRahVfhW6rvxH+nkRsud0/hzv2K96GMNzEomK ctqt/buwrDxrwhbIn9gndPU1CvXpy/xPZoWPoSyqY7gLlgzJ8bYmKRM0wlPiCNr5Q0CUz9 HqZmvhnuvdLc/wZBmMRV+U5r67hUF/XShFCyHH7VMmyCQBwdFNa4Z8scoI+5Akxmxg7uTG II49M14LC81XjrAxzLEHutl4l4uRJDmFuR85l0r56UD2CUdjHonnG8HAiNQPjw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eUjgnBOB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eUjgnBOB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EEA15323D0 X-Spam-Score: 6.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: GLiV/y9+9Xp5 Hi, Am Freitag, dem 02.09.2022 um 17:02 +0300 schrieb Andrew Tropin: > Picked (guix build emacs-utils) for now, it's done to avoid huge > rebuilds, while testing, later we can move it to (guix build utils). > > Also, temporary added pandoc and texinfo to native-inputs for > emacs-build-system, otherwise I would need to update inputs for > almost every emacs-* package.  Need to figure out what to do with > this. I still don't like that we need pandoc and texinfo as implicit inputs. There ought to be a better solution than this. > > > > > Attaching the latest version of the documentation-files patch I > > > have > > Looking at this patch, perhaps we'd also have to allow customizing > > command line options.  Also, as for installing, I think this should > > be > > handled by the install phase, which already has includes > > "^[^/]*\\.info$" and "^doc/.*\\.info$" by default.  Thus, you only > > need > > to build documentation before the install phase. > > That's right, but in the new iteration (v3) of build-documentation > phase I use find-root-library-file, which expects to be executed when > elpa directory is already available, so I can't do it before install > phase and need to manually install info files. > > Also, current build phases order is a little confusing, a lot of > builds happens after install phase, directly in output directory: > > `set-SOURCE-DATE-EPOCH' > `set-paths' > `install-locale' > `unpack' > `expand-load-path' > `patch-usr-bin-file' > `patch-source-shebangs' > `patch-generated-file-shebangs' > `check' > `install' > `make-autoloads' > `enable-autoloads-compilation' > `patch-el-files' > `ensure-package-description' > `build' > `validate-compiled-autoloads' > `build-documentation' > `move-doc' > `patch-shebangs' > `strip' > `validate-runpath' > `validate-documentation-location' > `delete-info-dir-file' > `patch-dot-desktop-files' > `make-dynamic-linker-cache' > `install-license-files' > `reset-gzip-timestamps' > `compress-documentation' > > What if instead of install phase we will use create-tmp-lisp-and- > documentation-directories phase (or something > more meaningful) to make a temporary directory, where we will build > all the stuff and after that, at the end of the build process will > install everything from this temporary directory to the store?  This > way emacs-build-system will become more usual and easier to > understand andpredict. I don't think we would need to do staged installations. As for why we don't build in the temporary directory, I do not know, I merely inherited that code. > +(define* (build-documentation-texinfo > + #:key > + (files '()) > + (command '("makeinfo" "--no-split"))) > + "Don't forget to add texinfo into list of inputs for the package." > + (lambda* (#:key outputs #:allow-other-keys) > + (for-each (lambda (f) (apply invoke (append command (list f)))) > files))) This is hardly specific to emacs, is it? Also, append is usually a code smell. Can't we (apply invoke "makeinfo" file options)? > +(define* (convert-documentation > + #:key > + (mapping '()) > + (command '("pandoc"))) > + "Don't forget to add pandoc into list of inputs for the package." > + (lambda* (#:key outputs #:allow-other-keys) > + (for-each (lambda (p) (apply invoke > + (append command > + (list (car p) "-o" (cdr > p))))) > + mapping))) As above. > +(define* (build-documentation-org > + #:key > + (files '())) This one is emacs-specific due to emacs-batch-script and can remain there. > + (add-after 'validate-compiled-autoloads 'move-doc move-doc) > + (add-before 'move-doc 'build-documentation > build-documentation))) I don't think that we'll have to add this phase once we've added the helpers. And as previously discussed, we'd have to build the documentation before install. Cheers