[cairo-commit] src/check-doc-syntax.sh src/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Jan 29 01:33:01 PST 2008


 src/Makefile.am         |  352 ++++++++++++++++++++++++++----------------------
 src/check-doc-syntax.sh |    5 
 2 files changed, 195 insertions(+), 162 deletions(-)

New commits:
commit b28f4f57f21ac4091c9457873abe1465ec3f7fed
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Jan 29 04:32:39 2008 -0500

    [src/Makefile.am] Reorganize
    
    Main goal was to be able to pass list of all cairo sources, enabled or
    not, to check-doc-syntax.sh such that it doesn't check *.h, *.c, *.cpp
    because that can be annoying when bisecting.

diff --git a/src/Makefile.am b/src/Makefile.am
index e908b9b..53cee44 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,86 @@
-font_subset_sources =				\
+backend_pkgconfigs =
+
+cairo_base_headers = cairo.h
+
+cairo_base_sources =				\
+	cairo.c					\
+	cairo.h					\
+	cairo-private.h				\
+	cairo-arc.c				\
+	cairo-arc-private.h			\
+	cairo-array.c				\
+	cairo-atomic.c				\
+	cairo-atomic-private.h			\
+	cairo-base85-stream.c			\
+	cairo-bentley-ottmann.c			\
+	cairo-cache.c				\
+	cairo-clip.c				\
+	cairo-clip-private.h			\
+	cairo-color.c				\
+	cairo-compiler-private.h		\
+	cairo-debug.c				\
+	cairo-fixed.c				\
+	cairo-font-face.c			\
+	cairo-font-options.c			\
+	cairo-freelist.c			\
+	cairo-freelist-private.h		\
+	cairo-gstate.c				\
+	cairo-gstate-private.h			\
+	cairo-hash.c				\
+	cairo-hash-private.h			\
+	cairo-hull.c				\
+	cairo-image-surface.c			\
+	cairo-lzw.c				\
+	cairo-malloc-private.h			\
+	cairo-matrix.c				\
+	cairo-mutex.c				\
+	cairo-mutex-private.h			\
+	cairo-mutex-type-private.h		\
+	cairo-path.c				\
+	cairo-path-private.h			\
+	cairo-path-bounds.c			\
+	cairo-path-fill.c			\
+	cairo-path-fixed.c			\
+	cairo-path-fixed-private.h		\
+	cairo-path-stroke.c			\
+	cairo-pen.c				\
+	cairo-polygon.c				\
+	cairo-rectangle.c			\
+	cairo-reference-count-private.h		\
+	cairo-region.c				\
+	cairo-region-private.h			\
+	cairo-scaled-font.c			\
+	cairo-scaled-font-private.h		\
+	cairo-skiplist.c			\
+	cairo-skiplist-private.h		\
+	cairo-slope.c				\
+	cairo-spline.c				\
+	cairo-stroke-style.c			\
+	cairo-surface.c				\
+	cairo-surface-fallback.c		\
+	cairo-surface-fallback-private.h	\
+	cairo-surface-private.h			\
+	cairo-traps.c				\
+	cairo-pattern.c				\
+	cairo-unicode.c				\
+	cairo-output-stream.c			\
+	cairo-output-stream-private.h		\
+	cairo-wideint.c				\
+	cairo-wideint-private.h			\
+	cairo-wideint-type-private.h		\
+	cairo-meta-surface.c			\
+	cairo-meta-surface-private.h		\
+	cairo-paginated-private.h		\
+	cairo-paginated-surface.c		\
+	cairo-paginated-surface-private.h	\
+	cairo-analysis-surface.c		\
+	cairo-analysis-surface-private.h	\
+	cairoint.h
+cairo_all_sources = $(cairo_base_sources) $(cairo_base_headers)
+cairo_headers = $(cairo_base_headers)
+cairo_sources = $(cairo_base_sources)
+
+font_subset_sources_base =			\
 	cairo-cff-subset.c			\
 	cairo-truetype-subset.c			\
 	cairo-type1-fallback.c			\
@@ -6,101 +88,140 @@ font_subset_sources =				\
 	cairo-truetype-subset-private.h		\
 	cairo-scaled-font-subsets.c		\
 	cairo-scaled-font-subsets-private.h
+cairo_all_sources += $(font_subset_sources_base)
+
+font_subset_sources_ft = cairo-type1-subset.c
+cairo_all_sources += $(font_subset_sources_ft)
+font_subset_sources = $(font_subset_sources_base)
 if CAIRO_HAS_FT_FONT
-font_subset_sources += cairo-type1-subset.c
+font_subset_sources += $(font_subset_sources_ft)
 endif
 
-backend_pkgconfigs =
-
+ps_headers = cairo-ps.h
+ps_sources = cairo-ps-surface.c cairo-ps-surface-private.h
+cairo_all_sources += $(ps_headers) $(ps_sources)
 if CAIRO_HAS_PS_SURFACE
-libcairo_ps_headers = cairo-ps.h
-libcairo_ps_sources = cairo-ps-surface.c cairo-ps-surface-private.h
 libcairo_font_subset_sources =	$(font_subset_sources)
+cairo_headers += $(ps_headers)
+cairo_sources += $(ps_sources)
 backend_pkgconfigs += cairo-ps.pc
 endif
 
+pdf_headers = cairo-pdf.h
+pdf_sources = cairo-pdf-surface.c cairo-pdf-surface-private.h \
+	      cairo-pdf-operators.c cairo-pdf-operators-private.h \
+	      cairo-deflate-stream.c
+cairo_all_sources += $(pdf_headers) $(pdf_sources)
 if CAIRO_HAS_PDF_SURFACE
-libcairo_pdf_headers = cairo-pdf.h
-libcairo_pdf_sources = cairo-pdf-surface.c cairo-pdf-surface-private.h \
-	               cairo-pdf-operators.c cairo-pdf-operators-private.h \
-		       cairo-deflate-stream.c
 libcairo_font_subset_sources =	$(font_subset_sources)
+cairo_headers += $(pdf_headers)
+cairo_sources += $(pdf_sources)
 backend_pkgconfigs += cairo-pdf.pc
 endif
 
+png_sources = cairo-png.c
+cairo_all_sources += $(png_sources)
 if CAIRO_HAS_PNG_FUNCTIONS
-libcairo_png_sources = cairo-png.c
+cairo_sources += $(png_sources)
 backend_pkgconfigs += cairo-png.pc
 endif
 
+svg_headers = cairo-svg.h
+svg_sources = cairo-svg-surface.c cairo-svg-surface-private.h
+cairo_all_sources += $(svg_headers) $(svg_sources)
 if CAIRO_HAS_SVG_SURFACE
-libcairo_svg_headers = cairo-svg.h
-libcairo_svg_sources = cairo-svg-surface.c cairo-svg-surface-private.h
 libcairo_font_subset_sources =	$(font_subset_sources)
+cairo_headers += $(svg_headers)
+cairo_sources += $(svg_sources)
 backend_pkgconfigs += cairo-svg.pc
 endif
 
+test_sources = test-fallback-surface.c test-fallback-surface.h \
+	       test-meta-surface.c test-meta-surface.h		\
+	       test-paginated-surface.c test-paginated-surface.h
+cairo_all_sources += $(test_sources)
 if CAIRO_HAS_TEST_SURFACES
-libcairo_test_sources = test-fallback-surface.c test-fallback-surface.h \
-			test-meta-surface.c test-meta-surface.h		\
-			test-paginated-surface.c test-paginated-surface.h
+cairo_sources += $(test_sources)
 endif
 
+xlib_headers =  cairo-xlib.h
+xlib_sources =  cairo-xlib-surface.c \
+		cairo-xlib-surface-private.h \
+		cairo-xlib-display.c \
+		cairo-xlib-screen.c \
+		cairo-xlib-private.h \
+		cairo-xlib-xrender-private.h
+cairo_all_sources += $(xlib_headers) $(xlib_sources)
 if CAIRO_HAS_XLIB_SURFACE
-libcairo_xlib_headers = cairo-xlib.h
-libcairo_xlib_sources = cairo-xlib-surface.c \
-			cairo-xlib-surface-private.h \
-			cairo-xlib-display.c \
-			cairo-xlib-screen.c \
-			cairo-xlib-private.h \
-			cairo-xlib-xrender-private.h
+cairo_headers += $(xlib_headers)
+cairo_sources += $(xlib_sources)
 backend_pkgconfigs += cairo-xlib.pc
 endif
 
+xlib_xrender_headers = cairo-xlib-xrender.h
+cairo_all_sources += $(xlib_xrender_headers)
 if CAIRO_HAS_XLIB_XRENDER_SURFACE
-libcairo_xlib_xrender_headers = cairo-xlib-xrender.h
+cairo_headers += $(xlib_xrender_headers)
 backend_pkgconfigs += cairo-xlib-xrender.pc
 endif
 
+xcb_headers = cairo-xcb.h cairo-xcb-xrender.h
+xcb_sources = cairo-xcb-surface.c
+cairo_all_sources += $(xcb_headers) $(xcb_sources)
 if CAIRO_HAS_XCB_SURFACE
-libcairo_xcb_headers = cairo-xcb.h cairo-xcb-xrender.h
-libcairo_xcb_sources = cairo-xcb-surface.c
+cairo_headers += $(xcb_headers)
+cairo_sources += $(xcb_sources)
 backend_pkgconfigs += cairo-xcb.pc
 endif
 
+quartz_headers = cairo-quartz.h
+quartz_sources = cairo-quartz-surface.c cairo-quartz-private.h
+cairo_all_sources += $(quartz_headers) $(quartz_sources)
 if CAIRO_HAS_QUARTZ_SURFACE
-libcairo_quartz_headers = cairo-quartz.h
-libcairo_quartz_sources = cairo-quartz-surface.c cairo-quartz-private.h
+cairo_headers += $(quartz_headers)
+cairo_sources += $(quartz_sources)
 backend_pkgconfigs += cairo-quartz.pc
 endif
 
-libcairo_win32_sources =
+os_win32_sources = cairo-win32.c
+cairo_all_sources += $(os_win32_sources)
 if OS_WIN32
-libcairo_win32_sources += cairo-win32.c
+cairo_sources += $(os_win32_sources)
 export_symbols = -export-symbols cairo.def
 cairo_def_dependency = cairo.def
 endif
 
+win32_headers = cairo-win32.h
+win32_sources = cairo-win32-surface.c cairo-win32-printing-surface.c cairo-win32-private.h
+cairo_all_sources += $(win32_headers) $(win32_sources)
 if CAIRO_HAS_WIN32_SURFACE
-libcairo_win32_headers = cairo-win32.h
-libcairo_win32_sources += cairo-win32-surface.c cairo-win32-printing-surface.c cairo-win32-private.h
+cairo_headers += $(win32_headers)
+cairo_sources += $(win32_sources)
 backend_pkgconfigs += cairo-win32.pc
 endif
-# This is not really a separate conditional.  Is TRUE iff the previous one is.
+
+win32_font_sources = cairo-win32-font.c
+cairo_all_sources += $(win32_font_sources)
 if CAIRO_HAS_WIN32_FONT
-libcairo_win32_sources += cairo-win32-font.c
+cairo_sources += $(win32_font_sources)
+backend_pkgconfigs += cairo-win32-font.pc
 endif
 
-libcairo_os2_sources =
+os2_headers = cairo-os2.h
+os2_sources = cairo-os2-surface.c cairo-os2-private.h
+cairo_all_sources += $(os2_headers) $(os2_sources)
 if CAIRO_HAS_OS2_SURFACE
-libcairo_os2_headers = cairo-os2.h
-libcairo_os2_sources += cairo-os2-surface.c cairo-os2-private.h
+cairo_headers += $(os2_headers)
+cairo_sources += $(os2_sources)
+backend_pkgconfigs += cairo-os2.pc
 endif
 
-libcairo_beos_sources =
+beos_headers = cairo-beos.h
+beos_sources = cairo-beos-surface.cpp
+cairo_all_sources += $(beos_headers) $(beos_sources)
 if CAIRO_HAS_BEOS_SURFACE
-libcairo_beos_headers = cairo-beos.h
-libcairo_beos_sources += cairo-beos-surface.cpp
+cairo_headers += $(beos_headers)
+cairo_sources += $(beos_sources)
 backend_pkgconfigs += cairo-beos.pc
 
 noinst_LTLIBRARIES = libcairo_beos.la
@@ -109,27 +230,39 @@ libcairo_beos_la_SOURCES = $(libcairo_beos_sources)
 libcairo_beos_la_CXXFLAGS = -Wno-multichar
 endif
 
+glitz_headers = cairo-glitz.h
+glitz_sources = cairo-glitz-surface.c cairo-glitz-private.h
+cairo_all_sources += $(glitz_headers) $(glitz_sources)
 if CAIRO_HAS_GLITZ_SURFACE
-libcairo_glitz_headers = cairo-glitz.h
-libcairo_glitz_sources = cairo-glitz-surface.c cairo-glitz-private.h
+cairo_headers += $(glitz_headers)
+cairo_sources += $(glitz_sources)
 backend_pkgconfigs += cairo-glitz.pc
 endif
 
+directfb_headers = cairo-directfb.h
+directfb_sources = cairo-directfb-surface.c
+cairo_all_sources += $(directfb_headers) $(directfb_sources)
 if CAIRO_HAS_DIRECTFB_SURFACE
-libcairo_directfb_headers = cairo-directfb.h
-libcairo_directfb_sources = cairo-directfb-surface.c
+cairo_headers += $(directfb_headers)
+cairo_sources += $(directfb_sources)
 backend_pkgconfigs += cairo-directfb.pc
 endif
 
+ft_headers = cairo-ft.h
+ft_sources = cairo-ft-font.c cairo-ft-private.h
+cairo_all_sources += $(ft_headers) $(ft_sources)
 if CAIRO_HAS_FT_FONT
-libcairo_ft_headers = cairo-ft.h
-libcairo_ft_sources = cairo-ft-font.c cairo-ft-private.h
+cairo_headers += $(ft_headers)
+cairo_sources += $(ft_sources)
 backend_pkgconfigs += cairo-ft.pc
 endif
 
+atsui_headers = cairo-atsui.h
+atsui_sources = cairo-atsui-font.c
+cairo_all_sources += $(atsui_headers) $(atsui_sources)
 if CAIRO_HAS_ATSUI_FONT
-libcairo_atsui_headers = cairo-atsui.h
-libcairo_atsui_sources = cairo-atsui-font.c
+cairo_headers += $(atsui_headers)
+cairo_sources += $(atsui_sources)
 backend_pkgconfigs += cairo-atsui.pc
 endif
 
@@ -140,23 +273,6 @@ endif
 FONTCONFIG_LIBS=@FONTCONFIG_LIBS@
 XRENDER_LIBS=@XRENDER_LIBS@
 
-cairo_headers =				\
-	cairo.h				\
-	$(libcairo_atsui_headers)	\
-	$(libcairo_ft_headers)		\
-	$(libcairo_glitz_headers)	\
-	$(libcairo_pdf_headers)		\
-	$(libcairo_svg_headers)		\
-	$(libcairo_ps_headers)		\
-	$(libcairo_quartz_headers)	\
-	$(libcairo_win32_headers)	\
-	$(libcairo_os2_headers)		\
-	$(libcairo_beos_headers)	\
-	$(libcairo_xcb_headers)		\
-	$(libcairo_xlib_headers)	\
-	$(libcairo_xlib_xrender_headers)	\
-	$(libcairo_directfb_headers)
-
 cairoincludedir = $(includedir)/cairo
 cairoinclude_HEADERS =			\
 	cairo-deprecated.h		\
@@ -167,100 +283,10 @@ nodist_cairoinclude_HEADERS =		\
 
 lib_LTLIBRARIES = libcairo.la
 
-libcairo_la_base_sources =			\
-	cairo.c					\
-	cairo.h					\
-	cairo-private.h				\
-	cairo-arc.c				\
-	cairo-arc-private.h			\
-	cairo-array.c				\
-	cairo-atomic.c				\
-	cairo-atomic-private.h			\
-	cairo-base85-stream.c			\
-	cairo-bentley-ottmann.c			\
-	cairo-cache.c				\
-	cairo-clip.c				\
-	cairo-clip-private.h			\
-	cairo-color.c				\
-	cairo-compiler-private.h		\
-	cairo-debug.c				\
-	cairo-fixed.c				\
-	cairo-font-face.c			\
-	cairo-font-options.c			\
-	cairo-freelist.c			\
-	cairo-freelist-private.h		\
-	cairo-gstate.c				\
-	cairo-gstate-private.h			\
-	cairo-hash.c				\
-	cairo-hash-private.h			\
-	cairo-hull.c				\
-	cairo-image-surface.c			\
-	cairo-lzw.c				\
-	cairo-malloc-private.h			\
-	cairo-matrix.c				\
-	cairo-mutex.c				\
-	cairo-mutex-private.h			\
-	cairo-mutex-type-private.h		\
-	cairo-path.c				\
-	cairo-path-private.h			\
-	cairo-path-bounds.c			\
-	cairo-path-fill.c			\
-	cairo-path-fixed.c			\
-	cairo-path-fixed-private.h		\
-	cairo-path-stroke.c			\
-	cairo-pen.c				\
-	cairo-polygon.c				\
-	cairo-rectangle.c			\
-	cairo-reference-count-private.h		\
-	cairo-region.c				\
-	cairo-region-private.h			\
-	cairo-scaled-font.c			\
-	cairo-scaled-font-private.h		\
-	cairo-skiplist.c			\
-	cairo-skiplist-private.h		\
-	cairo-slope.c				\
-	cairo-spline.c				\
-	cairo-stroke-style.c			\
-	cairo-surface.c				\
-	cairo-surface-fallback.c		\
-	cairo-surface-fallback-private.h	\
-	cairo-surface-private.h			\
-	cairo-traps.c				\
-	cairo-pattern.c				\
-	cairo-unicode.c				\
-	cairo-output-stream.c			\
-	cairo-output-stream-private.h		\
-	cairo-wideint.c				\
-	cairo-wideint-private.h			\
-	cairo-wideint-type-private.h		\
-	cairo-meta-surface.c			\
-	cairo-meta-surface-private.h		\
-	cairo-paginated-private.h		\
-	cairo-paginated-surface.c		\
-	cairo-paginated-surface-private.h	\
-	cairo-analysis-surface.c		\
-	cairo-analysis-surface-private.h	\
-	$(libcairo_atsui_sources)		\
-	$(libcairo_ft_sources)			\
-	$(libcairo_ps_sources)			\
-	$(libcairo_pdf_sources)			\
-	$(libcairo_png_sources)			\
-	$(libcairo_svg_sources)			\
-	$(libcairo_test_sources)		\
-	$(libcairo_font_subset_sources)		\
-	$(libcairo_xlib_sources)		\
-	$(libcairo_xcb_sources)			\
-	$(libcairo_quartz_sources)		\
-	$(libcairo_glitz_sources)		\
-	$(libcairo_win32_sources)		\
-	$(libcairo_os2_sources)			\
-	$(libcairo_directfb_sources)		\
-	cairoint.h
-
 # source files that cannot be passed to compiler directly.
 # mostly when they depend recursively on cairoint.h.  that is,
 # cairoint.h includes them in the middle.
-libcairo_la_special_sources =			\
+cairo_special_sources =				\
 	cairo-cache-private.h			\
 	cairo-fixed-private.h			\
 	cairo-fixed-type-private.h		\
@@ -268,8 +294,12 @@ libcairo_la_special_sources =			\
 	cairo-types-private.h
 
 libcairo_la_SOURCES =				\
-	$(libcairo_la_base_sources)		\
-	$(libcairo_la_special_sources)
+	$(cairo_sources)			\
+	$(cairo_special_sources)
+
+cairo_all_source_file =				\
+	$(cairo_all_sources)			\
+	$(cairo_special_sources)
 
 libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
 
@@ -317,7 +347,7 @@ install-data-local:
 	  false ;									\
         fi
 
-TESTS_ENVIRONMENT = srcdir="$(srcdir)" MAKE="$(MAKE)"
+TESTS_ENVIRONMENT = srcdir="$(srcdir)" MAKE="$(MAKE)" cairo_all_source_file="$(cairo_all_source_file)"
 TESTS = check-def.sh check-plt.sh check-headers.sh check-cairoint.sh check-doc-syntax.sh
 EXTRA_DIST += $(TESTS) check-has-hidden-symbols.c
 DISTCLEANFILES += check-has-hidden-symbols.i
@@ -329,14 +359,14 @@ DISTCLEANFILES += check-has-hidden-symbols.i
 
 SPARSE = sparse
 sparse:
-	@status=true; for f in $(libcairo_la_base_sources); do \
+	@status=true; for f in $(cairo_sources); do \
 		echo sparse $$f; \
 		$(SPARSE) -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $$f || status=false; \
 	done; $$status
 
 SPLINT = splint -badflag
 splint:
-	@status=true; for f in $(libcairo_la_base_sources); do \
+	@status=true; for f in $(cairo_sources); do \
 		test "$$f" = "`echo "$$f" | sed 's/[.]h$$//'`" || continue; \
 		echo sparse $$f; \
 		$(SPLINT) -I$(top_builddir) $(libcairo_la_CFLAGS) -DHAVE_CONFIG_H $$f || status=false; \
diff --git a/src/check-doc-syntax.sh b/src/check-doc-syntax.sh
index eeb96b2..12a4fff 100755
--- a/src/check-doc-syntax.sh
+++ b/src/check-doc-syntax.sh
@@ -15,7 +15,10 @@ echo Checking documentation for incorrect syntax
 # Note: this test is also run from doc/public/ to check the SGML files
 
 if test "x$SGML_DOCS" = x; then
-	FILES=`find "$srcdir" -name '*.h' -or -name '*.c' -or -name '*.cpp'`
+	FILES="$cairo_all_source_file"
+	if test "x$FILES" = x; then
+		FILES=`find "$srcdir" -name '*.h' -or -name '*.c' -or -name '*.cpp'`
+	fi
 fi
 
 enum_regexp='\([^%@]\|^\)\<\(FALSE\|TRUE\|NULL\|CAIRO_[0-9A-Z_]*[^(0-9A-Z_]\)'


More information about the cairo-commit mailing list