[gegl] build: fix srcdir!=builddir issues



commit ff113469dac3b746c98bc6905928dfb1e3c9d4f7
Author: �yvind Kolås <pippin gimp org>
Date:   Fri Mar 19 12:06:23 2010 +0000

    build: fix srcdir!=builddir issues
    
    builddir is always equal to "./" sometimes this is not set, so stop
    relying on it.

 docs/Makefile.am               |    9 +++++----
 examples/Makefile.am           |    9 ++++++++-
 tests/compositions/Makefile.am |   10 +++++-----
 3 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/docs/Makefile.am b/docs/Makefile.am
index cdc9c22..d8f0c04 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -22,6 +22,9 @@ HTML_FILES += api.html images/inheritance.png
 GTKDOC_FILES += api.html
 endif
 
+gegl.devhelp: api.html
+	echo
+
 # dummy target to force the operations be available for scanning when
 # creating the docbook index when doing parallel builds.
 api.html: operations.html
@@ -183,8 +186,7 @@ index.html: index-static.txt		\
 	Makefile.am
 if HAVE_ASCIIDOC
 	@echo "HTML: $@"
-	cp $< $@ 
-	$(ASCIIDOC) --unsafe  -o $@ -a stylesdir=`pwd` -a toc -a theme=gegl -a quirks! $<
+	$(ASCIIDOC) --unsafe  -o $@ -a stylesdir=`pwd`/$(srcdir) -a toc -a theme=gegl -a quirks! $<
 else
 	@echo "*** asciidoc must be available in order to make dist"
 	@false
@@ -193,8 +195,7 @@ endif
 development.html: $(top_srcdir)/docs/development.txt
 if HAVE_ASCIIDOC
 	@echo "HTML: $@"
-	cp $< $@ 
-	$(ASCIIDOC) --unsafe  -o $@ -a stylesdir=`pwd` -a toc -a theme=gegl -a quirks! $<
+	$(ASCIIDOC) --unsafe  -o $@ -a stylesdir=`pwd`/$(srcdir) -a toc -a theme=gegl -a quirks! $<
 else
 	@echo "*** asciidoc must be available in order to make dist"
 	@false
diff --git a/examples/Makefile.am b/examples/Makefile.am
index b0251e5..865c24d 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -8,9 +8,16 @@ EXTRA_DIST = $(wildcard *.c) $(wildcard util/*.[ch])
 all-local: $(bins)
 
 %: %.c $(GEGLHEADERS)
-	$(LIBTOOL) --mode=compile $(CC) $(DEFS) -I. -I$(top_builddir) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $  lo $<
+	$(LIBTOOL) --mode=compile $(CC) $(DEFS) -I. -I$(top_builddir) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $  lo $< 
 	$(LIBTOOL) --mode=link    $(CC) $(AM_LDFLAGS) $(LDFLAGS) $(CFLAGS) -o $@ $  lo $(LIBS)
 
+gegl-paint: gegl-paint.c $(GEGLHEADERS)
+	touch gegl-paint
+if HAVE_GTK
+	$(LIBTOOL) --mode=compile $(CC) $(DEFS) -I. -I$(top_builddir) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $  lo $< 
+	$(LIBTOOL) --mode=link    $(CC) $(AM_LDFLAGS) $(LDFLAGS) $(CFLAGS) -o $@ $  lo $(LIBS)
+endif
+
 clean-local:
 	rm -f *.lo $(bins)
 
diff --git a/tests/compositions/Makefile.am b/tests/compositions/Makefile.am
index d9e7323..594cc0f 100644
--- a/tests/compositions/Makefile.am
+++ b/tests/compositions/Makefile.am
@@ -2,23 +2,23 @@ SUBDIRS=data
 
 EXTRA_DIST=$(wildcard *.xml) $(wildcard reference/*.png) verify-results.sh
 
-$(builddir)/output/%.png: %.xml
+output/%.png: %.xml
 	@echo $@ > /tmp/a ;\
 	GEGL_SWAP=RAM GEGL_PATH=$(top_builddir)/operations \
 	$(top_builddir)/bin/gegl$(EXEEXT) $< -o $@ 
 
-images.stamp: $(wildcard $(builddir)/*.xml) \
+images.stamp: $(wildcard $(srcdir)/*.xml) \
               $(wildcard $(top_builddir)/operations/*/*$(SHREXT)) \
 	      $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
 	      $(top_builddir)/bin/gegl$(EXEEXT)
 	@echo "--[updating test renders]--"; \
 	mkdir output || true > /dev/null;
-	test -e $(builddir)/reference || ln -s $(srcdir)/reference $(builddir)/reference || true > /dev/null;
+	test -e reference || ln -s $(srcdir)/reference reference || true > /dev/null;
 	for XML in $(srcdir)/*.xml; do \
 	    export BASE=`echo $$XML | sed s?$(srcdir)/?? | sed s/\.xml//`;\
             PNG=$$BASE".png";\
 	    echo $${XML}; \
-	   $(MAKE) $(builddir)"/output/$$PNG" >/dev/null; \
+	   $(MAKE) "output/$$PNG" >/dev/null; \
 	done
 	@touch images.stamp
 
@@ -32,7 +32,7 @@ tests-report: images.stamp $(top_srcdir)/tools/img_cmp
 	    export BASE=`echo $$XML | sed s?$(srcdir)/?? | sed s/\.xml//`;\
 	    PNG=$$BASE".png";\
             GEGL_SWAP=RAM GEGL_PATH=$(top_builddir)/operations \
-	    $(top_builddir)/tools/img_cmp $(srcdir)/reference/$$PNG $(builddir)/output/$$PNG >> tests-report; true ;\
+	    $(top_builddir)/tools/img_cmp $(srcdir)/reference/$$PNG output/$$PNG >> tests-report; true ;\
 	   done;
 
 clean-local:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]