From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 04EB044B31 for ; Tue, 17 Jun 2025 16:02:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EE4D568C8D0; Tue, 17 Jun 2025 19:02:16 +0300 (EEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 22D8768C03F for ; Tue, 17 Jun 2025 19:02:10 +0300 (EEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-747fc7506d4so4892896b3a.0 for ; Tue, 17 Jun 2025 09:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750176127; x=1750780927; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=jWfWfmy+Yv28uwCZHJ0w3Z/uj1AMNT0xmqsFPncfRZw=; b=jGXx2oc2Df/p1nVxaqo/gt4Hf/K+gVT9LrfSmLRoriEITI4UHWxa/IWC/Yudj/iR8Q QEOkg2GKxfarHB+K/JdWWU5zYp+VjBWDleMsJdR3kNSO+o4t+kj5lAC0zDSXZlhgchSJ 8bi6LH4AlkYQBCTK6d3IGhKIQ/w3Nsin2Hfqvs4sgzD2PFH+xhm1DWYa9tdSEgMuyF7w /B3xEG4GAfp60KSfkiHqUYg0/K15ZW6/iGVF6Vx59X8EXy7DI8Ewom/Z/R3t/4WL5gdY ToVSHphseaH6cUGC9MrRNq3G+bzOPbJr++xgzBs5bQ2Nx0k3A7bDoHb60XHqdkGpBrSF zwKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750176127; x=1750780927; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jWfWfmy+Yv28uwCZHJ0w3Z/uj1AMNT0xmqsFPncfRZw=; b=T9plXO6Zbsm2mGl9gMD0mYUBLyN1vsbwkphgTxGFK9BOXlYF5S8pNIbjCAmOW6Fp4S Ppoc7C2ga6iPrvokEfk9ifIvnllh0GFMZ9ZzE1qqzfsrpj34YAIjv9gpze1wnGleEtvf v5PyslEztpV0J2bEpYBERr7JlD4sT5Pcdgd/KK4MteyXsAHrVdrqKVKEnExi9pOlZ5RX mqji8VqIrY8eOp5rZ5zhBVts762hussb++sLYT2v+s/aBOKhpFRImRrhreHFCBUhooRp IEwtTqj0mnweMntoH+CPiFn2zO6LzMdtbb/ry6rokpY34hhF1YC2ZAeiGE8hvqnIH9cx pm/A== X-Gm-Message-State: AOJu0YxBXGj0i1piNy+yzlZtQ0qotHGShyHe4GsS3K2bjFONz9R9vq/x CW3HdtwER6ARgrGPEVxjIT3aZ9aHFeV6WMwLqDV6gvL70S0AKeJ0vNlhbo+5pg== X-Gm-Gg: ASbGncv5WgFPkMi4GKNARopgMeVJeUr8VFZKyTxO+GMOo39pmA0OOVuDxWDv+j5YWDd +UiIH0Teffujc5Ey7jvM3S1rLsHsoJb7FJVosjgPOu24XdqY5o+0U1k602dIlk95460xxqepj3W /ejIHSOpPoQOWxBvS2LeRbn4MV76+7q+VG7M9PYbO7u2d3BjekIXCMup/BnxX04Ec0KPtepWeM5 y9reoyrnByVWIbu+uaq3hGLNRFU+VlJqNiVco9yrA9BqzsvWxuDbLW2cre7anBjeAN/DfssO/GK JoyA1oYQ2znBxSkkqdFMDzj3fz98+Nwms7u+5uADSqwd0slb7mz2S9f4CXqdjkKWI3Om/EmDHoq snLLx X-Google-Smtp-Source: AGHT+IG0mL1LkLucxR/5TA7i2zBLRWbkOqL2NnWb++nI+LV70FmlkNxDDMOJMrGZlf9ZHwtQoPf5Ig== X-Received: by 2002:a05:6a00:2ea6:b0:747:ee09:1fdf with SMTP id d2e1a72fcca58-7489cf6aaf9mr18546161b3a.4.1750176125762; Tue, 17 Jun 2025 09:02:05 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7488ffed0c2sm9012369b3a.22.2025.06.17.09.02.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jun 2025 09:02:03 -0700 (PDT) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: Date: Tue, 17 Jun 2025 16:01:50 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v6 1/2] ffbuild/commonmak: Fix rebuild check with implicit rule chains X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz When there's a chain of implicit rules, make treats files generated inside that chain as intermediate files. Those intermediate files are removed after completion of make. When make is run again, it normally determines the need for a rebuild by comparing the timestamps of the original source file and the final output of the chain and if still up-to-date, it doesn't rebuild, even when the intermediate files are not present. That makes sense of course - why would it delete them otherwise, it would end up in builds being never up-to-date. But this original by-the-book logic appeared to be broken and has been worked around by adding all intermediate files to the .SECONDARY special target, which required extra logic and issues with make clean. What broke the up-to-date checking is the dependency file generation. For the .c files generated by BIN2C the compile target created a .d file which indicated that the .ptx.o file has a dependency on the ptx.c file. And that dependency broke the normal make behavior with intermediate files. This patch compiles the BIN2C generated .c files without generating .d files. In turn the files do not longer need to be added to the .SECONDARY target in common.mak. When interested in those files for debugging, a line can be added to the corresponding Makefile like .SECONDARY: %.ptx.c %.ptx.gz Signed-off-by: softworkz --- ffbuild/common.mak | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ffbuild/common.mak b/ffbuild/common.mak index ddf48923ea..8304a9e9cb 100644 --- a/ffbuild/common.mak +++ b/ffbuild/common.mak @@ -139,6 +139,10 @@ else $(BIN2C) $(patsubst $(SRC_PATH)/%,$(SRC_LINK)/%,$<) $@ $(subst .,_,$(basename $(notdir $@))) endif +%.ptx.o: CCDEP = +%.ptx.o: CC_DEPFLAGS = + + # 1) Preprocess CSS to a minified version %.css.min: TAG = SED %.css.min: %.css @@ -179,6 +183,10 @@ else # NO COMPRESSION $(BIN2C) $< $@ $(subst .,_,$(basename $(notdir $@))) endif +%.html.o %.css.o: CCDEP = +%.html.o %.css.o: CC_DEPFLAGS = + + clean:: $(RM) $(BIN2CEXE) $(CLEANSUFFIXES:%=ffbuild/%) @@ -229,10 +237,9 @@ SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-) SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%) HOBJS = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o)) PTXOBJS = $(filter %.ptx.o,$(OBJS)) -RESOURCEOBJS = $(filter %.css.o %.html.o,$(OBJS)) $(HOBJS): CCFLAGS += $(CFLAGS_HEADERS) checkheaders: $(HOBJS) -.SECONDARY: $(HOBJS:.o=.c) $(PTXOBJS:.o=.c) $(PTXOBJS:.o=.gz) $(PTXOBJS:.o=) $(RESOURCEOBJS:.o=.c) $(RESOURCEOBJS:%.css.o=%.css.min) $(RESOURCEOBJS:%.css.o=%.css.min.gz) $(RESOURCEOBJS:%.html.o=%.html.gz) $(RESOURCEOBJS:.o=) +.SECONDARY: $(HOBJS:.o=.c) $(PTXOBJS:.o=) alltools: $(TOOLS) -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".