From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 29 Jul 2022 14:53:46 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oHPUw-003bHo-Cw for lore@lore.pengutronix.de; Fri, 29 Jul 2022 14:53:46 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oHPUv-0004zu-SU; Fri, 29 Jul 2022 14:53:45 +0200 Received: from mail.ela-soft.com ([213.23.49.162]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oHPUb-0004zl-Qo for ptxdist@pengutronix.de; Fri, 29 Jul 2022 14:53:26 +0200 Received: from [10.0.1.142] (tupai.ela-bln.local [10.0.1.142]) by mail.ela-soft.com (mailsystem) with ESMTPSA id 28473E60C for ; Fri, 29 Jul 2022 14:53:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ela-soft.com; s=2021; t=1659099205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wj4SN6ZS+Z5gQy9KI3K89qz5oMJ3ydaus9/IrD1KEFg=; b=F5Dt4t0f8I4y+AxMQIm1vsFFyZrVztGnyFw6Qu820dps6d0e89K9CEo5tYaBVFo8CIfpFw 1UJDTgEMIh9JKDT9tioD96l9S5EpA1NQ3fI5XRUo071hrL2gypVqtUEG+iS28giCq8AxUA UW6ZZeOoMpw9FZgaaKDzR2s8TbZkBw0hFRZaeBFu89/hrDtnoO58bDcuZFgOFbVkIo0hs2 fZKRcio8Ig/889nl8k9o+Hui1QS9hHX7hYoKZRhX5Ja9Is4XN38Rwy4LzkbILNcKdJleh0 kPbPnNbyOGTrM3b6XYO46c2EqMqbtr30WiWddp0akFJrebJVwiqiRuRNRQia+Q== Message-ID: <38e4e7f0-6a16-1b70-c57f-ffcad40b18fd@ela-soft.com> Date: Fri, 29 Jul 2022 14:53:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Content-Language: de-DE To: ptxdist@pengutronix.de References: <418570e2-7fbd-f917-3cad-98e52247d275@ela-soft.com> <20220729104859.GC20240@pengutronix.de> <20220729105413.GD20240@pengutronix.de> <20220729120250.GE20240@pengutronix.de> From: Andreas Helmcke In-Reply-To: <20220729120250.GE20240@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-102.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_IN_WELCOMELIST,USER_IN_WHITELIST autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [ptxdist] Problems with own get rule X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hello, Am 29.07.22 um 14:02 schrieb Michael Olbrich: > On Fri, Jul 29, 2022 at 01:23:22PM +0200, Andreas Helmcke wrote: >> Hello, >> >> Am 29.07.22 um 12:54 schrieb Michael Olbrich: >>> On Fri, Jul 29, 2022 at 12:48:59PM +0200, Michael Olbrich wrote: >>>> On Fri, Jul 29, 2022 at 12:37:50PM +0200, Andreas Helmcke wrote: >>>>> Hello, >>>>> >>>>> i have defined my own get rule to fetch some sources from svn. I did not use the buildin svn support because: >>>>> 1. there are different svn targets which must get checked out to specific directories >>>>> 2. i want to use tags, not revision numbers >>>>> >>>>> This works pretty well, there is only one problem. >>>>> >>>>> After ptxdist menuconfig is called to change the version number, the compile step fails with missing directory because the get rule wont get called. It should, since the source directory does not exists (the directory name contains the version (tag) name). >>>>> >>>>> Any advice is appreciated. >>>> >>>> Which PTXdist version? I think with a current version, foo.get should be >>>> called whenever the value of $(FOO) changes. >> >> ptxdist version: 2022.05.0 >> >>> It's only used indirectly via FOO_SOURCE. Try setting: >>> >>> FOO_SOURCE := $(FOO_SRC_DIR) >> >> this produces a circular dependency: >> >> make: Circular .../svn_src/foo-V2.00.01-B2 <- .../svn_src/foo-V2.00.01-B2 dependency dropped. > > Hmmm, so maybe you will need to find another way. In general ptxdist uses > make here and it generates the dependencies and has default implemenations > for certain targets. > For the 'get' part, ptxdist works like this: > > If there is something to download, then it expects $(FOO_SOURCE) to refer > to a single file that contains all the source. PTXdist will denn generate a > make target that handles the download based on $(FOO_URL). > > The foo.get stage has a existence only dependency on $(FOO_SOURCE). This > means that it is not triggered when the timestamp for $(FOO_SOURCE) > changes. > This stage will mostly check if the md5 matches. > > Now, you can overwrite foo.get with something else, but then you need to > have your own dependencies that trigger foo.get. > > Maybe something like this: > > $(STATEDIR)/foo.$(FOO_VERSION): > @$(call touch) > > $(STATEDIR)/foo.get: $(STATEDIR)/foo.$(FOO_VERSION) > ... Thanks. That works perfectly. Andreas > > Michael > >>>>> The make file has this rules: >>>>> >>>>>> # >>>>>> # We provide this package >>>>>> # >>>>>> PACKAGES-$(PTXCONF_FOO) += foo >>>>>> >>>>>> # >>>>>> # Paths and names >>>>>> # >>>>>> FOO_VERSION := $(call ptx/config-version, PTXCONF_FOO) >>>>>> FOO_MD5 := >>>>>> FOO := foo-$(FOO_VERSION) >>>>>> FOO_SRC_DIR := $(PTXDIST_WORKSPACE)/svn_src/$(FOO) >>>>>> FOO_URL := lndir://$(FOO_SRC_DIR) >>>>>> FOO_DIR := $(BUILDDIR)/$(FOO) >>>>>> FOO_LICENSE := unknown >>>>>> >>>>>> FOO_SVN_BASE_URL := \ >>>>>> https://subversion.company.com/entwicklung/foo_bar/foo/tags/$(FOO_VERSION) >>>>>> >>>>>> # ---------------------------------------------------------------------------- >>>>>> # Get >>>>>> # ---------------------------------------------------------------------------- >>>>>> >>>>>> $(STATEDIR)/foo.get: >>>>>> @$(call targetinfo) >>>>>> @$(call clean, $(FOO_SRC_DIR)) >>>>>> @svn export \ >>>>>> $(FOO_SVN_BASE_URL)/foo/phyCard-release $(FOO_SRC_DIR)/foo/phyCard-release >>>>>> @svn export \ >>>>>> $(FOO_SVN_BASE_URL)/foo/src $(FOO_SRC_DIR)/foo/src >>>>>> @$(call touch) >>>>>> >>>>>> >>>>>> # ---------------------------------------------------------------------------- >>>>>> # Extract >>>>>> # ---------------------------------------------------------------------------- >>>>>> >>>>>> $(STATEDIR)/foo.extract: >>>>>> @$(call targetinfo) >>>>>> @$(call clean, $(FOO_DIR)) >>>>>> @$(call extract, FOO) >>>>>> @$(call patchin, FOO) >>>>>> @$(call touch) >>>>> >>>>> >>>>