root/Makefile.in

Revision 50b52fa36b0de085a30d430c9704c80f62678553, 4.1 KB (checked in by David I. Lehn <dlehn@…>, 16 months ago)

Fix packages rule dependency.

Shouldn't depend on "all" since the Debian packaging process will run
make after the dir is properly cleaned and configured for Debian use.

  • Property mode set to 100644
Line 
1# The top-level Makefile that is used to build
2
3# setup variables from configure
4prefix = @prefix@
5exec_prefix = @exec_prefix@
6libdir = @libdir@
7includedir = @includedir@
8
9# pkg-config dirs
10pkgconfigdir = @libdir@/pkgconfig
11
12# Python build control
13BUILD_FOR_PYTHON=@BUILD_FOR_PYTHON@
14PY_DEFAULT := @PY_DEFAULT@
15PY_VERSIONS := $(sort @PY_VERSIONS@ $(PY_DEFAULT))
16
17VERSION = @VERSION@
18
19SUBDIRS := c
20ifeq ($(BUILD_FOR_PYTHON),yes)
21SUBDIRS += python
22endif
23SUBDIRS += tests
24
25ifdef PRINT_DIRECTORIES
26MAKE_CMD = $(MAKE) -j -l 5.0
27MAKE_DIR = $(MAKE_CMD) -C $(dir)
28else
29MAKE_CMD = $(MAKE) -j -l 5.0 --no-print-directory -s
30MAKE_DIR = $(MAKE_CMD) -C $(dir)
31endif
32
33LIBS_DIR = @RDFADIR@/libs
34
35.PHONY: all verbose clean test docs install-python
36
37all: docs
38   @$(foreach dir,$(SUBDIRS),$(MAKE_DIR) \
39      build-objects build-libraries \
40      PY_VERSIONS="$(PY_VERSIONS)" \
41      PY_DEFAULT="$(PY_DEFAULT)" &&) true
42   @$(foreach dir,$(SUBDIRS),$(MAKE_DIR) \
43      build-executables &&) true
44
45clean:
46   @$(foreach dir,$(SUBDIRS),MAKE_CLEAN_ACTIVE=true $(MAKE_DIR) clean &&) true
47   @rm -rf libs/*
48   @rm -rf installers/packages
49   @echo "Removed all objects and libraries."
50
51tests: all
52   LD_LIBRARY_PATH=@RDFADIR@/libs tests/dist/curies
53   LD_LIBRARY_PATH=@RDFADIR@/libs tests/dist/rdfa2n3 tests/testsuite/0001.xhtml
54
55docs:
56   @$(MAKE_DIR) docs
57
58install-librdfa:
59   @echo "Installing librdfa libraries to $(DESTDIR)$(libdir) ..."
60   @install -d $(DESTDIR)$(libdir)
61   @install -m 644 $(LIBS_DIR)/librdfa.so $(DESTDIR)$(libdir)/librdfa.so.$(VERSION)
62   @ln -sf librdfa.so.$(VERSION) $(DESTDIR)$(libdir)/librdfa.so
63
64install-librdfa-dev:
65   @echo "Installing librdfa development support to $(DESTDIR)$(libdir) ..."
66   @install -d $(DESTDIR)$(libdir)
67   @install -d $(DESTDIR)$(includedir)
68   @install -d $(DESTDIR)$(pkgconfigdir)
69   @install -m 644 $(LIBS_DIR)/librdfa.a $(DESTDIR)$(libdir)/librdfa.a
70   @install -m 644 c/rdfa.h $(DESTDIR)$(includedir)
71   @install -m 644 c/rdfa_utils.h $(DESTDIR)$(includedir)
72   @install -m 644 librdfa.pc $(DESTDIR)$(pkgconfigdir)
73
74# FIXME: this should install to site-packages for 2.5 and dist-packages for 2.6
75ifeq ($(BUILD_FOR_PYTHON),yes)
76install-python%:
77   echo "Installing python extensions to $(DESTDIR)$(libdir)/python$*/site-packages ..."
78   install -d $(DESTDIR)$(libdir)/python$*/site-packages
79   install -m 644 python/dist/rdfa.py $(DESTDIR)$(libdir)/python$*/site-packages
80   install -m 644 python/dist/python$*-rdfa.so $(DESTDIR)$(libdir)/python$*/site-packages/_rdfa.so
81install-python: $(PY_VERSIONS:%=install-python%)
82else
83install-python:
84endif
85
86packages:
87   @echo "Generating Debian packages..."
88   @ln -sf installers/debian debian
89   @dpkg-buildpackage -us -uc -rfakeroot
90   @mkdir -p installers/packages
91   @mv ../*rdfa*@RELEASE@*deb installers/packages
92   @echo "Generating RPM packages..."
93   @cd installers/packages && fakeroot alien --to-rpm -k --scripts *deb
94   @echo "Generating TGZ packages..."
95   @cd installers/packages && fakeroot alien --to-tgz -k --scripts *deb
96   @echo "Generating Solaris packages..."
97   @cd installers/packages && fakeroot alien --to-pkg -k --scripts *deb
98   @echo "Generating Stampede packages..."
99   @cd installers/packages && fakeroot alien --to-slp -k --scripts *deb
100
101ifeq (@OS@,mingw32)
102install-windows:
103   @echo "Generating Windows ZIP release..."
104   @mkdir -p installers/librdfa-windows-@RELEASE@
105   @cp c/rdfa.h installers/librdfa-windows-@RELEASE@
106   @cp c/rdfa_utils.h installers/librdfa-windows-@RELEASE@
107   @cp libs/rdfa.dll installers/librdfa-windows-@RELEASE@
108   @cp libs/rdfa.lib installers/librdfa-windows-@RELEASE@
109   @cd installers && zip -r librdfa-@VERSION@-windows-@RELEASE@.zip \
110      librdfa-windows-@RELEASE@
111   @rm -rf installers/librdfa-windows-@RELEASE@
112endif
113
114ifeq (@OS@,macos)
115install-macos:
116   @echo "Generating Mac OS X ZIP release..."
117   @mkdir -p installers/librdfa-macos-@RELEASE@
118   @cp c/rdfa.h installers/librdfa-macos-@RELEASE@
119   @cp c/rdfa_utils.h installers/librdfa-macos-@RELEASE@
120   @cp libs/librdfa.dylib installers/librdfa-macos-@RELEASE@
121   @cp libs/librdfa.a installers/librdfa-macos-@RELEASE@
122   @cd installers && zip -r librdfa-@VERSION@-macos-@RELEASE@.zip \
123      librdfa-macos-@RELEASE@
124   @rm -rf installers/librdfa-macos-@RELEASE@
125endif
126
127
128install: install-librdfa install-librdfa-dev install-python
129
130verbose:
131   PRINT_DIRECTORIES=true $(MAKE) all
Note: See TracBrowser for help on using the browser.