File: Makefile.am

package info (click to toggle)
pygoocanvas 0.14.1-1.2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,316 kB
  • ctags: 346
  • sloc: sh: 10,119; xml: 9,442; python: 3,119; makefile: 203; ansic: 70
file content (80 lines) | stat: -rw-r--r-- 2,326 bytes parent folder | download | duplicates (2)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# require automake-1.7
AUTOMAKE_OPTIONS=1.7

SUBDIRS = demo

if ENABLE_DOCS
SUBDIRS += docs
endif

INCLUDES = $(PYTHON_INCLUDES)

EXTRA_DIST =	goocanvas.defs		\
		goocanvas.override	\
		arg-types.py		\
		ChangeLog-pre-git

BUILT_EXTRA_DIST = ChangeLog

# goocanvas module
pyexec_LTLIBRARIES = goocanvasmodule.la
goocanvasmodule_la_LDFLAGS = -module -avoid-version -no-undefined -export-symbols-regex initgoocanvas
goocanvasmodule_la_CFLAGS = $(PYGOOCANVAS_CFLAGS)
goocanvasmodule_la_LIBADD = $(PYGOOCANVAS_LIBS) $(PYTHON_LDFLAGS)
goocanvasmodule_la_SOURCES = goocanvasmodule.c 
nodist_goocanvasmodule_la_SOURCES = goocanvas.c
goocanvas.c: goocanvas.defs goocanvas.override arg-types.py
CLEANFILES = goocanvas.c

.defs.c:
	(cd $(srcdir)\
	&& $(PYTHON) $(CODEGEN) \
		--override $*.override \
		--load-types arg-types.py \
		--register @PYGTK_DATADIR@/pygtk/2.0/defs/gdk-types.defs \
		--register @PYGTK_DATADIR@/pygtk/2.0/defs/pango-types.defs \
		--register @PYGTK_DATADIR@/pygtk/2.0/defs/gtk-types.defs \
		--prefix py$* $*.defs) > gen-$*.c \
		&& cp gen-$*.c $*.c \
		&& rm -f gen-$*.c



pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pygoocanvas.pc
EXTRA_DIST += pygoocanvas.pc

if PLATFORM_WIN32
# Python .pyd modules are simply DLLs, but they have to be called .pyd for
# python to find them, and libtool only creates .dll.
install-exec-hook:
	mv $(pyexecdir)/goocanvasmodule.dll $(pyexecdir)/goocanvas.pyd
endif

.PHONY: ChangeLog

ChangeLog:
	@echo Creating $@
	@if test -d "$(srcdir)/.git"; then \
	  (GIT_DIR=$(top_srcdir)/.git ./missing --run git log PYGOOCANVAS_0_14_0^^.. --stat) | fmt --split-only > $@.tmp \
	  && mv -f $@.tmp $@ \
	  || ($(RM) $@.tmp; \
	      echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
	      (test -f $@ || echo git-log is required to generate this file >> $@)); \
	else \
	  test -f $@ || \
	  (echo A git checkout and git-log is required to generate ChangeLog >&2 && \
	  echo A git checkout and git-log is required to generate this file >> $@); \
	fi


distclean-local:
	if test $(srcdir) = .; then :; else \
	    rm -f $(BUILT_EXTRA_DIST); \
	fi

dist-hook: $(BUILT_EXTRA_DIST)
	files='$(BUILT_EXTRA_DIST)'; \
	for f in $$files; do \
	  if test -f $$f; then d=.; else d=$(srcdir); fi; \
	  rm -f $(distdir)/$$f && cp $$d/$$f $(distdir) || exit 1; done