File: Makefile.am

package info (click to toggle)
poppler-sharp 0.0.1-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 396 kB
  • ctags: 32
  • sloc: sh: 625; cs: 72; makefile: 60
file content (51 lines) | stat: -rw-r--r-- 1,182 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- makefile-automake -*-

ACLOCAL_AMFLAGS = -Im4

EXTRA_DIST = \
	poppler-sharp/poppler-api.raw \
	poppler-sharp/poppler.metadata \
	poppler-sharp/Document.cs

GENSOURCES = poppler-sharp/generated/*

CLEANFILES = \
	$(GENSOURCES) \
	poppler-sharp/poppler-api.xml \
	poppler-sharp.dll

pkglib_DATA = poppler-sharp.dll
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = sources/poppler-sharp.pc

if ENABLE_AUTOGEN_API
poppler-sharp/poppler-api.raw: sources/poppler-sharp.sources
	gapi2-parser $<
endif

poppler-sharp/poppler-api.xml: poppler-sharp/poppler-api.raw \
                               poppler-sharp/poppler.metadata
	[ -d $(dir $@) ] || mkdir -p $(dir $@)
	cp $< $@
	chmod u+w $@
	gapi2-fixup \
		--api=$@ \
		--metadata=$(lastword $^)

$(GENSOURCES): poppler-sharp/poppler-api.xml
	gapi2-codegen \
		--outdir=poppler-sharp/generated $(GTKSHARP_CFLAGS) \
		--generate $<
	sed -i -re \
		's/(\s*)public\s+class\s+Document/\1public partial class Document/' \
		poppler-sharp/generated/Document.cs

poppler-sharp.dll: poppler-sharp/Document.cs $(GENSOURCES)
	$(MCS) \
		-pkg:gtk-sharp-2.0 \
		-r:Mono.Cairo \
		-t:library \
		-out:$@ \
		-unsafe \
		$(GENSOURCES) \
		$<