Commit ea4910e6 authored by David Zeuthen's avatar David Zeuthen
parent 123fe631
......@@ -36,9 +36,12 @@ INCLUDES = \
$(NULL)
GTKDOC_LIBS = \
$(DBUS_GLIB_LIBS) \
$(GLIB_LIBS) \
$(top_builddir)/src/polkit/libpolkit.la \
$(DBUS_GLIB_LIBS) \
$(GLIB_LIBS) \
$(top_builddir)/src/kit/libkit.la \
$(top_builddir)/src/polkit/libpolkit.la \
$(top_builddir)/src/polkit-dbus/libpolkit-dbus.la \
$(top_builddir)/src/polkit-grant/libpolkit-grant.la \
$(NULL)
# Extra options to supply to gtkdoc-mkdb
......
......@@ -42,12 +42,19 @@ CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
if ENABLE_GTK_DOC
all-local: html-build.stamp
else
all-local:
endif
docs: html-build.stamp
#### scan ####
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
@echo 'gtk-doc: Scanning header files'
@-chmod -R u+w $(srcdir)
cd $(srcdir) && \
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
else \
......@@ -56,11 +63,9 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
test -f $$i || touch $$i ; \
done \
fi
cd $(srcdir) && \
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
touch scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
@true
#### templates ####
......@@ -74,9 +79,13 @@ tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections
tmpl.stamp: tmpl-build.stamp
@true
tmpl/*.sgml:
@true
#### xml ####
sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(expand_content_files)
sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
@echo 'gtk-doc: Building XML'
@-chmod -R u+w $(srcdir)
cd $(srcdir) && \
......@@ -98,16 +107,12 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
@echo 'gtk-doc: Fixing cross-references'
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
touch html-build.stamp
else
all-local:
endif
##############
clean-local:
rm -f *~ *.bak
rm -rf .libs
rm -rf tmpl
maintainer-clean-local: clean
cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
......@@ -146,9 +151,9 @@ dist-hook: dist-check-gtkdoc dist-hook-local
mkdir $(distdir)/html
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-cp $(srcdir)/xml/*.xml $(distdir)/xml
-cp $(srcdir)/html/* $(distdir)/html
cp $(srcdir)/html/* $(distdir)/html
if test -f $(srcdir)/$(DOC_MODULE).types; then \
cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \
fi
.PHONY : dist-hook-local
.PHONY : dist-hook-local docs
......@@ -38,6 +38,14 @@ if KIT_BUILD_TESTS
TESTS_ENVIRONMENT=
TESTS=kit-test
check_PROGRAMS=$(TESTS)
kit_test_SOURCES= \
kit-test-main.c
kit_test_LDADD=$(top_builddir)/src/kit/libkit.la
kit_test_LDFLAGS=
if KIT_GCOV_ENABLED
clean-gcov:
rm -f *.gcov .libs/*.gcda
......@@ -65,15 +73,5 @@ else
TESTS=
endif
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS=$(TESTS)
kit_test_SOURCES= \
kit-test-main.c
kit_test_LDADD=$(top_builddir)/src/kit/libkit.la
kit_test_LDFLAGS=
clean-local :
rm -f *~ *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg
......@@ -32,7 +32,7 @@ libexec_PROGRAMS = polkit-read-auth-helper
polkit_read_auth_helper_SOURCES = polkit-read-auth-helper.c
polkit_read_auth_helper_CFLAGS = @DBUS_CFLAGS@
polkit_read_auth_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la
polkit_read_auth_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la libpolkit-dbus.la
# polkit-read-auth-helper needs to be setgid $POLKIT_GROUP to be able
# to read authorization files in /var/lib/PolicyKit and
......@@ -50,6 +50,14 @@ if KIT_BUILD_TESTS
TESTS_ENVIRONMENT=
TESTS=polkit-dbus-test
check_PROGRAMS=$(TESTS)
polkit_dbus_test_SOURCES= \
polkit-dbus-test.h polkit-dbus-test.c
polkit_dbus_test_LDADD=$(top_builddir)/src/polkit-dbus/libpolkit-dbus.la
polkit_dbus_test_LDFLAGS=
if KIT_GCOV_ENABLED
clean-gcov:
rm -f *.gcov .libs/*.gcda
......@@ -83,15 +91,5 @@ else
TESTS=
endif
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS=$(TESTS)
polkit_dbus_test_SOURCES= \
polkit-dbus-test.h polkit-dbus-test.c
polkit_dbus_test_LDADD=$(top_builddir)/src/polkit-dbus/libpolkit-dbus.la
polkit_dbus_test_LDFLAGS=
clean-local :
rm -f *~ *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg
......@@ -44,14 +44,14 @@ if POLKIT_AUTHDB_DEFAULT
libexec_PROGRAMS = polkit-grant-helper polkit-grant-helper-pam polkit-explicit-grant-helper polkit-revoke-helper
polkit_grant_helper_SOURCES = polkit-grant-helper.c
polkit_grant_helper_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la $(top_builddir)/src/polkit-grant/libpolkit-grant.la
polkit_grant_helper_LDADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la libpolkit-grant.la
polkit_grant_helper_pam_SOURCES = polkit-grant-helper-pam.c
polkit_grant_helper_pam_LDADD = @AUTH_LIBS@
polkit_explicit_grant_helper_SOURCES = polkit-explicit-grant-helper.c
polkit_explicit_grant_helper_CFLAGS = @DBUS_CFLAGS@
polkit_explicit_grant_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la $(top_builddir)/src/polkit-grant/libpolkit-grant.la
polkit_explicit_grant_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la libpolkit-grant.la
polkit_revoke_helper_SOURCES = polkit-revoke-helper.c
polkit_revoke_helper_CFLAGS = @DBUS_CFLAGS@
......@@ -92,6 +92,14 @@ if KIT_BUILD_TESTS
TESTS_ENVIRONMENT=
TESTS=polkit-grant-test
check_PROGRAMS=$(TESTS)
polkit_grant_test_SOURCES= \
polkit-grant-test.h polkit-grant-test.c
polkit_grant_test_LDADD=$(top_builddir)/src/polkit-grant/libpolkit-grant.la
polkit_grant_test_LDFLAGS=
if KIT_GCOV_ENABLED
clean-gcov:
rm -f *.gcov .libs/*.gcda
......@@ -131,15 +139,5 @@ else
TESTS=
endif
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS=$(TESTS)
polkit_grant_test_SOURCES= \
polkit-grant-test.h polkit-grant-test.c
polkit_grant_test_LDADD=$(top_builddir)/src/polkit-grant/libpolkit-grant.la
polkit_grant_test_LDFLAGS=
clean-local :
rm -f *~ *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg
......@@ -81,6 +81,14 @@ if POLKIT_BUILD_TESTS
TESTS_ENVIRONMENT=
TESTS=polkit-test
check_PROGRAMS=$(TESTS)
polkit_test_SOURCES= \
polkit-test.h polkit-test.c
polkit_test_LDADD=$(top_builddir)/src/polkit/libpolkit.la
polkit_test_LDFLAGS=
if POLKIT_GCOV_ENABLED
clean-gcov:
rm -f *.gcov .libs/*.gcda
......@@ -108,16 +116,6 @@ else
TESTS=
endif
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS=$(TESTS)
polkit_test_SOURCES= \
polkit-test.h polkit-test.c
polkit_test_LDADD=$(top_builddir)/src/polkit/libpolkit.la
polkit_test_LDFLAGS=
clean-local :
rm -f *~ $(BUILT_SOURCES) *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment