~xubuntu-dev/libxfce4util/lucid

1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
1
# -*- mode: makefile -*-
2
3
####################################
4
# Everything below here is generic #
5
####################################
6
7
if GTK_DOC_USE_LIBTOOL
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
8
GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9
GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
10
else
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
11
GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
12
GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
13
endif
14
15
# We set GPATH here; this gives us semantics for GNU make
16
# which are more like other make's VPATH, when it comes to
17
# whether a source that is a target of one rule is then
18
# searched for in VPATH/GPATH.
19
#
20
GPATH = $(srcdir)
21
22
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
23
24
EXTRA_DIST = 				\
25
	$(content_files)		\
26
	$(HTML_IMAGES)			\
27
	$(DOC_MAIN_SGML_FILE)		\
28
	$(DOC_MODULE)-sections.txt	\
29
	$(DOC_MODULE)-overrides.txt
30
31
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
32
	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
33
34
SCANOBJ_FILES = 		 \
35
	$(DOC_MODULE).args 	 \
36
	$(DOC_MODULE).hierarchy  \
37
	$(DOC_MODULE).interfaces \
38
	$(DOC_MODULE).prerequisites \
39
	$(DOC_MODULE).signals
40
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
41
REPORT_FILES = \
42
	$(DOC_MODULE)-undocumented.txt \
43
	$(DOC_MODULE)-undeclared.txt \
44
	$(DOC_MODULE)-unused.txt
45
46
CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
47
48
if ENABLE_GTK_DOC
49
all-local: html-build.stamp
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
50
else
51
all-local:
52
endif
53
54
docs: html-build.stamp
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
55
56
#### scan ####
57
1.2.3 by Jani Monoses
Import upstream version 4.3.0svn+r19775
58
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
59
	@echo 'gtk-doc: Scanning header files'
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
60
	@-chmod -R u+w $(srcdir)
1.2.11 by Lionel Le Folgoc
Import upstream version 4.4.2
61
	cd $(srcdir) && \
62
	  gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
1.2.3 by Jani Monoses
Import upstream version 4.3.0svn+r19775
63
	if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
64
	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
65
	else \
66
	    cd $(srcdir) ; \
67
	    for i in $(SCANOBJ_FILES) ; do \
68
               test -f $$i || touch $$i ; \
69
	    done \
70
	fi
71
	touch scan-build.stamp
72
1.2.11 by Lionel Le Folgoc
Import upstream version 4.4.2
73
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
74
	@true
75
76
#### templates ####
77
78
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
79
	@echo 'gtk-doc: Rebuilding template files'
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
80
	@-chmod -R u+w $(srcdir)
1.2.3 by Jani Monoses
Import upstream version 4.3.0svn+r19775
81
	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
82
	touch tmpl-build.stamp
83
84
tmpl.stamp: tmpl-build.stamp
85
	@true
86
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
87
tmpl/*.sgml:
88
	@true
89
90
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
91
#### xml ####
92
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
93
sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
94
	@echo 'gtk-doc: Building XML'
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
95
	@-chmod -R u+w $(srcdir)
96
	cd $(srcdir) && \
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
97
	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
98
	touch sgml-build.stamp
99
100
sgml.stamp: sgml-build.stamp
101
	@true
102
103
#### html ####
104
105
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
106
	@echo 'gtk-doc: Building HTML'
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
107
	@-chmod -R u+w $(srcdir)
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
108
	rm -rf $(srcdir)/html
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
109
	mkdir $(srcdir)/html
110
	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
111
	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
112
	@echo 'gtk-doc: Fixing cross-references'
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
113
	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
114
	touch html-build.stamp
115
116
##############
117
118
clean-local:
119
	rm -f *~ *.bak
120
	rm -rf .libs
121
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
122
distclean-local:
123
	cd $(srcdir) && \
124
	  rm -rf xml $(REPORT_FILES) \
125
	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
126
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
127
maintainer-clean-local: clean
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
128
	cd $(srcdir) && rm -rf xml html
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
129
130
install-data-local:
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
131
	-installfiles=`echo $(srcdir)/html/*`; \
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
132
	if test "$$installfiles" = '$(srcdir)/html/*'; \
133
	then echo '-- Nothing to install' ; \
134
	else \
135
	  $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
136
	  for i in $$installfiles; do \
137
	    echo '-- Installing '$$i ; \
138
	    $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
139
	  done; \
140
	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
141
	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
142
	  which gtkdoc-rebase >/dev/null && \
143
	    gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
144
	fi
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
145
	
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
146
147
uninstall-local:
148
	rm -f $(DESTDIR)$(TARGET_DIR)/*
149
150
#
151
# Require gtk-doc when making dist
152
#
153
if ENABLE_GTK_DOC
1.2.3 by Jani Monoses
Import upstream version 4.3.0svn+r19775
154
dist-check-gtkdoc:
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
155
else
156
dist-check-gtkdoc:
157
	@echo "*** gtk-doc must be installed and enabled in order to make dist"
158
	@false
159
endif
160
161
dist-hook: dist-check-gtkdoc dist-hook-local
162
	mkdir $(distdir)/tmpl
163
	mkdir $(distdir)/xml
164
	mkdir $(distdir)/html
165
	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
166
	-cp $(srcdir)/xml/*.xml $(distdir)/xml
1.2.11 by Lionel Le Folgoc
Import upstream version 4.4.2
167
	cp $(srcdir)/html/* $(distdir)/html
1.2.12 by Michael Casadevall
Import upstream version 4.4.3
168
	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
169
	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
170
	cd $(distdir) && rm -f $(DISTCLEANFILES)
171
	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
1.2.1 by Benedikt Meurer
Import upstream version 4.2.1
172
1.2.10 by Lionel Le Folgoc
Import upstream version 4.4.1
173
.PHONY : dist-hook-local docs