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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
## Process this file with automake to produce Makefile.in
VERSION_CURRENT = 1
VERSION_REVISION = 0
VERSION_AGE = 0
LIBUPSTART_VERSION = $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE)
LIBUPSTART_VERSION_DOTTED = $(VERSION_CURRENT).$(VERSION_REVISION).$(VERSION_AGE)
AM_CFLAGS = \
$(NIH_CFLAGS) \
$(NIH_DBUS_CFLAGS) \
$(DBUS_CFLAGS)
AM_CPPFLAGS = \
-DLOCALEDIR="\"$(localedir)\"" \
-DSBINDIR="\"$(sbindir)\"" \
-I$(top_builddir) -I$(top_srcdir) -iquote$(builddir) -iquote$(srcdir) \
-I$(top_srcdir)/intl \
-I$(top_srcdir)/test -iquote $(top_srcdir)/test
lib_LTLIBRARIES = libupstart.la
# The library is built from the autogenerated code.
libupstart_la_SOURCES = upstart.h
include_HEADERS = $(libupstart_la_SOURCES)
upstartincludedir = $(includedir)/upstart
upstartinclude_HEADERS = \
upstart/com.ubuntu.Upstart.h \
upstart/com.ubuntu.Upstart.Instance.h \
upstart/com.ubuntu.Upstart.Job.h \
upstart/upstart-dbus.h
upstart/upstart-dbus.h: \
$(top_srcdir)/dbus/upstart.h \
upstart/com.ubuntu.Upstart.h \
upstart/com.ubuntu.Upstart.Instance.h \
upstart/com.ubuntu.Upstart.Job.h
cp $< $@
nodist_libupstart_la_SOURCES = \
$(com_ubuntu_Upstart_OUTPUTS) \
$(com_ubuntu_Upstart_Job_OUTPUTS) \
$(com_ubuntu_Upstart_Instance_OUTPUTS)
libupstart_la_LIBADD = \
$(LTLIBINTL) \
$(NIH_LIBS) \
$(NIH_DBUS_LIBS) \
$(DBUS_LIBS) \
-lrt
libupstart_la_LDFLAGS = \
-version-info $(LIBUPSTART_VERSION) \
-Wl,--version-script=$(srcdir)/libupstart.ver \
$(LIBS) $(NIH_LIBS) $(NIH_DBUS_LIBS) $(DBUS_LIBS) -lrt
# latest ABI
abi_official = $(srcdir)/abi/$(host_cpu)-$(host_os)/libupstart_$(LIBUPSTART_VERSION_DOTTED).abi
# disposable ABI descriptor for the currently-built library
abi_build_XML = libupstart-abi.xml
$(abi_build_XML): $(abi_build_XML).in
sed -e 's|[@]abs_builddir[@]|$(abs_builddir)|g' \
-e 's|[@]libupstart_version[@]|$(LIBUPSTART_VERSION_DOTTED)|g' \
$< > $@
libupstart.pc: libupstart.pc.in
sed -e 's|[@]LIBUPSTART_VERSION_DOTTED[@]|$(LIBUPSTART_VERSION_DOTTED)|g' \
$< > $@
pkgconfigdir = $(prefix)/lib/pkgconfig
pkgconfig_DATA = libupstart.pc
EXTRA_DIST = \
libupstart.pc.in.in \
run_abi_checker.sh.in \
libupstart.ver \
$(srcdir)/abi \
$(abi_build_XML).in
run_abi_checker.sh: run_abi_checker.sh.in libupstart.la $(abi_build_XML)
sed -e 's|[@]abs_builddir[@]|$(abs_builddir)|g' \
-e 's|[@]abs_srcdir[@]|$(abs_srcdir)|g' \
-e 's|[@]libupstart[@]|$(lib_LTLIBRARIES)|g' \
-e 's|[@]libupstart_version[@]|$(LIBUPSTART_VERSION)|g' \
-e 's|[@]abi_build_XML[@]|$(abi_build_XML)|g' \
-e 's|[@]abi_official[@]|$(abi_official)|g' \
-e 's|[@]abi_compliance_checker[@]|$(ABI_COMPLIANCE_CHECKER)|g' \
$< > $@
chmod +x $@
if ENABLE_TAP_OUTPUT
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
else
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
endif
TESTS = test_libupstart
check_PROGRAMS = $(TESTS)
check_SCRIPTS = run_abi_checker.sh
test_libupstart_SOURCES = tests/test_libupstart.c $(lib_LTLIBRARIES)
test_libupstart_LDADD = \
$(lib_LTLIBRARIES) \
$(NIH_LIBS) \
$(NIH_DBUS_LIBS) \
$(DBUS_LIBS) \
$(top_builddir)/test/libtest_util_common.a \
-lrt
com_ubuntu_Upstart_OUTPUTS = \
upstart/com.ubuntu.Upstart.c \
upstart/com.ubuntu.Upstart.h
com_ubuntu_Upstart_XML = \
../dbus/com.ubuntu.Upstart.xml
# XXX: We have to use proxy mode for clients
# XXX: (meaning we cannot use the library for init itself)
$(com_ubuntu_Upstart_OUTPUTS): $(com_ubuntu_Upstart_XML)
mkdir -p upstart
$(AM_V_GEN)$(NIH_DBUS_TOOL) \
--package=$(PACKAGE) \
--mode=proxy --prefix=upstart \
--default-interface=com.ubuntu.Upstart0_6 \
--output=$@ $<
com_ubuntu_Upstart_Job_OUTPUTS = \
upstart/com.ubuntu.Upstart.Job.c \
upstart/com.ubuntu.Upstart.Job.h
com_ubuntu_Upstart_Job_XML = \
../dbus/com.ubuntu.Upstart.Job.xml
$(com_ubuntu_Upstart_Job_OUTPUTS): $(com_ubuntu_Upstart_Job_XML)
mkdir -p upstart
$(AM_V_GEN)$(NIH_DBUS_TOOL) \
--package=$(PACKAGE) \
--mode=proxy --prefix=job_class \
--default-interface=com.ubuntu.Upstart0_6.Job \
--output=$@ $<
com_ubuntu_Upstart_Instance_OUTPUTS = \
upstart/com.ubuntu.Upstart.Instance.c \
upstart/com.ubuntu.Upstart.Instance.h
com_ubuntu_Upstart_Instance_XML = \
../dbus/com.ubuntu.Upstart.Instance.xml
$(com_ubuntu_Upstart_Instance_OUTPUTS): $(com_ubuntu_Upstart_Instance_XML)
mkdir -p upstart
$(AM_V_GEN)$(NIH_DBUS_TOOL) \
--package=$(PACKAGE) \
--mode=proxy --prefix=job \
--default-interface=com.ubuntu.Upstart0_6.Instance \
--output=$@ $<
# These have to be built sources because we can't compile object files
# without the header file existing first
BUILT_SOURCES = \
$(com_ubuntu_Upstart_OUTPUTS) \
$(com_ubuntu_Upstart_Job_OUTPUTS) \
$(com_ubuntu_Upstart_Instance_OUTPUTS) \
upstart/upstart-dbus.h
CLEANFILES = \
$(com_ubuntu_Upstart_OUTPUTS) \
$(com_ubuntu_Upstart_Job_OUTPUTS) \
$(com_ubuntu_Upstart_Instance_OUTPUTS) \
$(abi_build_XML) \
$(pkgconfig_DATA)
CLEANFILES += $(check_SCRIPTS) libupstart.pc.in
tests: $(check_PROGRAMS)
clean-local:
rm -f *.gcno *.gcda
rm -rf upstart/
maintainer-clean-local:
rm -f *.gcov
# Run ABI compliance checker on every build to ensure the library ABI
# has not been inadvertently broken due to dbus/*.xml being updated
# without a version change.
if HAVE_ABI_CHECKER
all-local: run_abi_checker.sh
$(builddir)/run_abi_checker.sh
endif
|