Hi,

2015-02-17 20:06 GMT+01:00 James Almer <jamr...@gmail.com>:
> $ make libavcodec/x86/dcadsp.o DBG=0

OK, it's mainly a matter of documentation then here, as just having
DBG defined is fine. I'm not sure of the makefile syntax if DBG=1 is
what is really wanted.

> YASM    libavcodec/x86/dcadsp.dbg.asm
> YASM    libavcodec/x86/dcadsp.o
> STRIP   libavcodec/x86/dcadsp.o
> rm libavcodec/x86/dcadsp.dbg.asm

Huh, a rm command isn't issued in the rule...

On the other hand, running make with debugging states:
Successfully remade target file `libavcodec/x86/dcadsp.o'.
Removing intermediate files...
rm libavcodec/x86/dcadsp.dbg.asm

So, in a way, the above is quite ok: no need to keep
libavcodec/x86/dcadsp.dbg.asm around if compilation was ok.

But if you run the command a 2nd time, it does keep it around :(
And it shouldn't even attempt this because compilation is succesful.

I think this a dependency rule issue for the .dbg.asm file

But even with the attached file, it still rebuilds it an additional
time. But third time is the charm, as it stops rebuilding it...

> $ rm libavcodec/x86/dcadsp.o
>
> $ make libavcodec/x86/dcadsp.o
> YASM    libavcodec/x86/dcadsp.dbg.asm

This seems fixed with the attached patch.

But I wonder if a dependency rule is really needed, as I can see it
causing issues... (does it depend on .asm or .dbg.asm etc)

So I don't think we there yet.

-- 
Christophe
From f3365ec79b096dad0ccd7246b78ea9b7074f3b49 Mon Sep 17 00:00:00 2001
From: Christophe Gisquet <christophe.gisq...@gmail.com>
Date: Wed, 18 Feb 2015 10:51:17 +0100
Subject: [PATCH] Makefile: improve DBG option for asm

This improves the cleanup, dependency generation and DBG command issuing.
---
 common.mak | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/common.mak b/common.mak
index a6fabb3..20b7fa3 100644
--- a/common.mak
+++ b/common.mak
@@ -7,10 +7,10 @@ all: all-yes
 
 DEFAULT_YASMD=.dbg
 
-ifndef DBG
-YASMD=
-else
+ifeq (1, DBG)
 YASMD=$(DEFAULT_YASMD)
+else
+YASMD=
 endif
 
 ifndef SUBDIR
@@ -152,11 +152,11 @@ LIBSUFFIXES       = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
 
 define RULES
 clean::
-	$(RM) $(OBJS) $(OBJS:.o=.d)
+	$(RM) $(OBJS) $(OBJS:.o=.d) $(OBJS:.o=$(DEFAULT_YASMD).d)
 	$(RM) $(HOSTPROGS)
 	$(RM) $(TOOLS)
 endef
 
 $(eval $(RULES))
 
--include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d) $(SLIBOBJS:.o=.d))
+-include $(wildcard $(OBJS:.o=.d) $(HOSTOBJS:.o=.d) $(TESTOBJS:.o=.d) $(HOBJS:.o=.d) $(SLIBOBJS:.o=.d)) $(OBJS:.o=$(DEFAULT_YASMD).d)
-- 
1.9.2.msysgit.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to