From a4e3d04aeb94f810e3d776808b78ac1c3f151f76 Mon Sep 17 00:00:00 2001 From: Richard Boulton Date: Sun, 14 Jan 2001 22:24:28 +0000 Subject: [PATCH] Adding nasty hack to rules to generate cothreads.{o,lo}, to get dependencies right. Rules copied from automake, and ... Original commit message from CVS: Adding nasty hack to rules to generate cothreads.{o,lo}, to get dependencies right. Rules copied from automake, and therefore a bit dependent on automake keeping doing dependency things the same kind of way, but it should work as long as automake puts dependencies into .deps/*.P --- gst/Makefile.am | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/gst/Makefile.am b/gst/Makefile.am index 6617b9e1e5..d945eb6917 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -43,10 +43,28 @@ libgst_la_SOURCES = \ $(GSTARCH_SRCS) # the compiler shoots cothreads.c in the head at -O6 +# FIXME: these manual rules break the dependency generation, so we have a +# nasty hack here. +LTCOMPILE2=$(LTCOMPILE) -O2 +COMPILE2=$(COMPILE) -O2 cothreads.lo: cothreads.c - $(LTCOMPILE) -O2 -c $< + @echo '$(LTCOMPILE2) -c $<'; \ + $(LTCOMPILE2) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp cothreads.o: cothreads.c - $(COMPILE) -O2 -c $< + @echo '$(COMPILE2) -c $<'; \ + $(COMPILE2) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp libgstincludedir = $(includedir)/gst libgstinclude_HEADERS = \