chiark / gitweb /
rules: mount fuse filesystem only 'add'
[elogind.git] / Makefile.am
1 # ------------------------------------------------------------------------------
2 # Copyright (C) 2008-2009 Kay Sievers <kay.sievers@vrfy.org>
3 # Copyright (C) 2009 Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
4 # ------------------------------------------------------------------------------
5
6 SUBDIRS = .
7
8 EXTRA_DIST = autogen.sh
9
10 ACLOCAL_AMFLAGS = -I m4
11
12 AM_MAKEFLAGS = --no-print-directory
13
14 AM_CPPFLAGS = \
15         -include $(top_builddir)/config.h \
16         -I$(top_srcdir)/libudev \
17         -DSYSCONFDIR=\""$(sysconfdir)"\" \
18         -DLIBEXECDIR=\""$(libexecdir)"\"
19
20 AM_CFLAGS = \
21         -fvisibility=hidden \
22         -ffunction-sections \
23         -fdata-sections
24
25 AM_LDFLAGS = \
26         -Wl,--gc-sections \
27         -Wl,--as-needed
28
29 DISTCHECK_CONFIGURE_FLAGS = \
30         --enable-gtk-doc \
31         --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
32
33 CLEANFILES =
34 BUILT_SOURCES =
35 INSTALL_EXEC_HOOKS =
36 INSTALL_DATA_HOOKS =
37 UNINSTALL_EXEC_HOOKS =
38 DISTCHECK_HOOKS =
39 dist_libexec_SCRIPTS =
40
41 # ------------------------------------------------------------------------------
42 # libudev
43 # ------------------------------------------------------------------------------
44 LIBUDEV_CURRENT=12
45 LIBUDEV_REVISION=0
46 LIBUDEV_AGE=12
47
48 SUBDIRS += libudev/docs
49
50 include_HEADERS = libudev/libudev.h
51 lib_LTLIBRARIES = libudev/libudev.la
52
53 libudev_libudev_la_SOURCES =\
54         libudev/libudev-private.h \
55         libudev/libudev.c \
56         libudev/libudev-list.c \
57         libudev/libudev-util.c \
58         libudev/libudev-device.c \
59         libudev/libudev-enumerate.c \
60         libudev/libudev-monitor.c \
61         libudev/libudev-queue.c
62
63 libudev_libudev_la_LDFLAGS = \
64         -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE)
65
66 noinst_LTLIBRARIES = \
67         libudev/libudev-private.la
68
69 libudev_libudev_private_la_SOURCES =\
70         $(libudev_libudev_la_SOURCES) \
71         libudev/libudev-util-private.c \
72         libudev/libudev-device-private.c \
73         libudev/libudev-queue-private.c
74
75 if WITH_SELINUX
76 libudev_libudev_private_la_SOURCES += libudev/libudev-selinux-private.c
77 libudev_libudev_private_la_LIBADD = $(SELINUX_LIBS)
78 endif
79
80 pkgconfigdir = $(libdir)/pkgconfig
81 pkgconfig_DATA = libudev/libudev.pc
82
83 EXTRA_DIST += libudev/COPYING
84 # move lib from $(libdir) to $(rootlib_execdir) and update devel link, if needed
85 libudev-install-move-hook:
86         if test "$(libdir)" != "$(rootlib_execdir)"; then \
87                 mkdir -p $(DESTDIR)$(rootlib_execdir) && \
88                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libudev.so) && \
89                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
90                 ln -sf $$so_img_rel_target_prefix$(rootlib_execdir)/$$so_img_name $(DESTDIR)$(libdir)/libudev.so && \
91                 mv $(DESTDIR)$(libdir)/libudev.so.* $(DESTDIR)$(rootlib_execdir); \
92         fi
93
94 libudev-uninstall-move-hook:
95         rm -f $(DESTDIR)$(rootlib_execdir)/libudev.so*
96
97 INSTALL_EXEC_HOOKS += libudev-install-move-hook
98 UNINSTALL_EXEC_HOOKS += libudev-uninstall-move-hook
99
100 # ------------------------------------------------------------------------------
101 # main udev
102 # ------------------------------------------------------------------------------
103 udev-confdirs:
104         -mkdir -p $(DESTDIR)$(sysconfdir)/udev/rules.d
105         -mkdir -p $(DESTDIR)$(libexecdir)/devices
106
107 INSTALL_DATA_HOOKS += udev-confdirs
108
109 EXTRA_DIST += \
110         rules/arch \
111         rules/misc
112
113 udevrulesdir = $(libexecdir)/rules.d
114 dist_udevrules_DATA = \
115         rules/rules.d/50-udev-default.rules \
116         rules/rules.d/60-persistent-storage.rules \
117         rules/rules.d/60-persistent-storage-tape.rules \
118         rules/rules.d/60-persistent-serial.rules \
119         rules/rules.d/60-persistent-input.rules \
120         rules/rules.d/60-persistent-alsa.rules \
121         rules/rules.d/80-drivers.rules \
122         rules/rules.d/95-udev-late.rules
123
124 udevconfdir = $(sysconfdir)/udev
125 dist_udevconf_DATA = udev.conf
126
127 sharepkgconfigdir = $(datadir)/pkgconfig
128 sharepkgconfig_DATA = udev/udev.pc
129
130 if WITH_SYSTEMD
131 systemdsystemunit_DATA = \
132         init/udev-control.socket \
133         init/udev-kernel.socket \
134         init/udev.service \
135         init/udev-trigger.service \
136         init/udev-settle.service
137
138 EXTRA_DIST += \
139         init/udev-control.socket \
140         init/udev-kernel.socket
141
142 systemd-install-hook:
143         mkdir -p $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
144         ln -sf ../udev-control.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/udev-control.socket
145         ln -sf ../udev-kernel.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/udev-kernel.socket
146         mkdir -p $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants
147         ln -sf ../udev.service $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants/udev.service
148         ln -sf ../udev-trigger.service $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants/udev-trigger.service
149
150 INSTALL_DATA_HOOKS += systemd-install-hook
151 endif
152
153 sbin_PROGRAMS = \
154         udev/udevd \
155         udev/udevadm
156
157 udev_common_sources =\
158         udev/udev.h \
159         udev/udev-event.c \
160         udev/udev-watch.c \
161         udev/udev-node.c \
162         udev/udev-rules.c \
163         udev/udev-ctrl.c
164
165 udev_udevd_SOURCES = \
166         $(udev_common_sources) \
167         udev/udevd.c \
168         udev/sd-daemon.h \
169         udev/sd-daemon.c
170 udev_udevd_LDADD = libudev/libudev-private.la
171
172 udev_udevadm_SOURCES = \
173         $(udev_common_sources) \
174         udev/udevadm.c \
175         udev/udevadm-info.c \
176         udev/udevadm-control.c \
177         udev/udevadm-test.c \
178         udev/udevadm-monitor.c \
179         udev/udevadm-settle.c \
180         udev/udevadm-trigger.c
181 udev_udevadm_LDADD = libudev/libudev-private.la
182
183 # ------------------------------------------------------------------------------
184 # udev man pages
185 # ------------------------------------------------------------------------------
186 dist_man_MANS = \
187         udev/udev.7 \
188         udev/udevadm.8 \
189         udev/udevd.8
190
191 dist_noinst_DATA = \
192         udev/udev.html \
193         udev/udevadm.html \
194         udev/udevd.html
195
196 EXTRA_DIST += \
197         udev/udev.xml \
198         udev/udevadm.xml \
199         udev/udevd.xml
200
201 udev/%.7 udev/%.8 : udev/%.xml
202         $(AM_V_GEN)$(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
203
204 udev/%.html : udev/%.xml
205         $(AM_V_GEN)$(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
206
207 # ------------------------------------------------------------------------------
208 # udev tests
209 # ------------------------------------------------------------------------------
210 TESTS = test/udev-test.pl test/rules-test.sh
211
212 check_PROGRAMS = \
213         libudev/test-libudev \
214         udev/test-udev
215
216 libudev_test_libudev_SOURCES = libudev/test-libudev.c
217 libudev_test_libudev_LDADD = libudev/libudev.la
218
219 udev_test_udev_SOURCES = \
220         $(udev_common_sources) \
221         udev/test-udev.c
222 udev_test_udev_LDADD = libudev/libudev-private.la
223
224 # ------------------------------------------------------------------------------
225 # firmware - firmware loading
226 # ------------------------------------------------------------------------------
227 extras_firmware_firmware_SOURCES = extras/firmware/firmware.c
228 extras_firmware_firmware_LDADD = libudev/libudev-private.la
229 extras_firmware_firmware_CPPFLAGS = $(AM_CPPFLAGS) -DFIRMWARE_PATH="$(FIRMWARE_PATH)"
230 dist_udevrules_DATA += extras/firmware/50-firmware.rules
231 libexec_PROGRAMS = extras/firmware/firmware
232
233 # ------------------------------------------------------------------------------
234 # ata_id - ATA identify
235 # ------------------------------------------------------------------------------
236 extras_ata_id_ata_id_SOURCES = extras/ata_id/ata_id.c
237 extras_ata_id_ata_id_LDADD = libudev/libudev-private.la
238 libexec_PROGRAMS += extras/ata_id/ata_id
239
240 # ------------------------------------------------------------------------------
241 # cdrom_id - optical drive/media capability
242 # ------------------------------------------------------------------------------
243 extras_cdrom_id_cdrom_id_SOURCES = extras/cdrom_id/cdrom_id.c
244 extras_cdrom_id_cdrom_id_LDADD = libudev/libudev-private.la
245 libexec_PROGRAMS += extras/cdrom_id/cdrom_id
246 dist_udevrules_DATA += extras/cdrom_id/60-cdrom_id.rules
247
248 # ------------------------------------------------------------------------------
249 # collect - trigger action when a collection of devices appeared
250 # ------------------------------------------------------------------------------
251 extras_collect_collect_SOURCES = extras/collect/collect.c
252 extras_collect_collect_LDADD = libudev/libudev-private.la
253 libexec_PROGRAMS += extras/collect/collect
254
255 # ------------------------------------------------------------------------------
256 # input_id - import input device class
257 # ------------------------------------------------------------------------------
258 extras_input_id_input_id_SOURCES = extras/input_id/input_id.c
259 extras_input_id_input_id_LDADD = libudev/libudev-private.la
260 libexec_PROGRAMS += extras/input_id/input_id
261
262 # ------------------------------------------------------------------------------
263 # path_id - compose identifier of persistent elements of the parent buses
264 # ------------------------------------------------------------------------------
265 extras_path_id_path_id_SOURCES = extras/path_id/path_id.c
266 extras_path_id_path_id_LDADD = libudev/libudev-private.la
267 libexec_PROGRAMS += extras/path_id/path_id
268
269 # ------------------------------------------------------------------------------
270 # scsi_id - SCSI inquiry to get various serial numbers
271 # ------------------------------------------------------------------------------
272 extras_scsi_id_scsi_id_SOURCES =\
273         extras/scsi_id/scsi_id.c \
274         extras/scsi_id/scsi_serial.c \
275         extras/scsi_id/scsi.h \
276         extras/scsi_id/scsi_id.h
277 extras_scsi_id_scsi_id_LDADD = libudev/libudev-private.la
278 libexec_PROGRAMS += extras/scsi_id/scsi_id
279 dist_man_MANS += extras/scsi_id/scsi_id.8
280 EXTRA_DIST += extras/scsi_id/README
281
282 # ------------------------------------------------------------------------------
283 # usb_id - USB device property import
284 # ------------------------------------------------------------------------------
285 extras_usb_id_usb_id_SOURCES = extras/usb_id/usb_id.c
286 extras_usb_id_usb_id_LDADD = libudev/libudev-private.la
287 libexec_PROGRAMS += extras/usb_id/usb_id
288
289 # ------------------------------------------------------------------------------
290 # v4l_id - video4linux capabilities
291 # ------------------------------------------------------------------------------
292 extras_v4l_id_v4l_id_SOURCES = extras/v4l_id/v4l_id.c
293 extras_v4l_id_v4l_id_LDADD = libudev/libudev-private.la
294 libexec_PROGRAMS += extras/v4l_id/v4l_id
295 dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules
296
297 # ------------------------------------------------------------------------------
298 # mtd_probe - autoloads FTL module for mtd devices
299 # ------------------------------------------------------------------------------
300 extras_mtd_probe_mtd_probe_SOURCES =  \
301         extras/mtd_probe/mtd_probe.c \
302         extras/mtd_probe/mtd_probe.h \
303         extras/mtd_probe/probe_smartmedia.c
304 extras_mtd_probe_mtd_probe_CPPFLAGS = $(AM_CPPFLAGS)
305 dist_udevrules_DATA += extras/mtd_probe/75-probe_mtd.rules
306 libexec_PROGRAMS += extras/mtd_probe/mtd_probe
307
308 # ------------------------------------------------------------------------------
309 # accelerometer - updates device orientation
310 # ------------------------------------------------------------------------------
311 extras_accelerometer_accelerometer_SOURCES = extras/accelerometer/accelerometer.c
312 extras_accelerometer_accelerometer_LDADD = libudev/libudev-private.la -lm
313 libexec_PROGRAMS += extras/accelerometer/accelerometer
314 dist_udevrules_DATA += extras/accelerometer/61-accelerometer.rules
315
316 # ------------------------------------------------------------------------------
317 # qemu -- qemu/kvm guest tweaks
318 # ------------------------------------------------------------------------------
319 dist_udevrules_DATA += extras/qemu/42-qemu-usb.rules
320
321 if ENABLE_RULE_GENERATOR
322 # ------------------------------------------------------------------------------
323 # rule_generator - persistent network and optical device rule generator
324 # ------------------------------------------------------------------------------
325 dist_libexec_SCRIPTS += \
326         extras/rule_generator/write_cd_rules \
327         extras/rule_generator/write_net_rules
328
329 udevhomedir = $(libexecdir)
330 dist_udevhome_DATA = extras/rule_generator/rule_generator.functions
331
332 dist_udevrules_DATA += \
333         extras/rule_generator/75-cd-aliases-generator.rules \
334         extras/rule_generator/75-persistent-net-generator.rules
335 endif
336
337 if ENABLE_HWDB
338 # ------------------------------------------------------------------------------
339 # usb/pci-db - read vendor/device string database
340 # ------------------------------------------------------------------------------
341 extras_usb_db_usb_db_SOURCES = extras/usb-db/usb-db.c
342 extras_usb_db_usb_db_CPPFLAGS = $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
343 extras_usb_db_usb_db_LDADD = libudev/libudev-private.la
344 libexec_PROGRAMS += extras/usb-db/usb-db
345 dist_udevrules_DATA += \
346         rules/rules.d/75-net-description.rules \
347         rules/rules.d/75-tty-description.rules \
348         rules/rules.d/78-sound-card.rules
349
350 extras_usb_db_pci_db_SOURCES = extras/usb-db/usb-db.c
351 extras_usb_db_pci_db_CPPFLAGS = $(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI
352 extras_usb_db_pci_db_LDADD = libudev/libudev-private.la
353 libexec_PROGRAMS += extras/usb-db/pci-db
354 endif
355
356 if ENABLE_UDEV_ACL
357 # ------------------------------------------------------------------------------
358 # udev_acl - apply ACLs for users with local forground sessions
359 # ------------------------------------------------------------------------------
360 extras_udev_acl_udev_acl_SOURCES = extras/udev-acl/udev-acl.c
361 extras_udev_acl_udev_acl_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
362 extras_udev_acl_udev_acl_LDADD = libudev/libudev-private.la -lacl $(GLIB_LIBS)
363 dist_udevrules_DATA += extras/udev-acl/70-acl.rules
364 libexec_PROGRAMS += extras/udev-acl/udev-acl
365
366 udevacl-install-hook:
367         mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d
368         ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck
369
370 INSTALL_EXEC_HOOKS += udevacl-install-hook
371 endif
372
373 if ENABLE_GUDEV
374 # ------------------------------------------------------------------------------
375 # GUdev - libudev gobject interface
376 # ------------------------------------------------------------------------------
377 LIBGUDEV_CURRENT=1
378 LIBGUDEV_REVISION=0
379 LIBGUDEV_AGE=1
380
381 SUBDIRS += extras/gudev/docs
382
383 libgudev_includedir=$(includedir)/gudev-1.0/gudev
384 libgudev_include_HEADERS = \
385         extras/gudev/gudev.h \
386         extras/gudev/gudevenums.h \
387         extras/gudev/gudevenumtypes.h \
388         extras/gudev/gudevtypes.h \
389         extras/gudev/gudevclient.h \
390         extras/gudev/gudevdevice.h \
391         extras/gudev/gudevenumerator.h
392
393 lib_LTLIBRARIES += extras/gudev/libgudev-1.0.la
394 pkgconfig_DATA += extras/gudev/gudev-1.0.pc
395
396 extras_gudev_libgudev_1_0_la_SOURCES = \
397         extras/gudev/gudevenums.h \
398         extras/gudev/gudevenumtypes.h \
399         extras/gudev/gudevenumtypes.h\
400         extras/gudev/gudevtypes.h \
401         extras/gudev/gudevclient.h \
402         extras/gudev/gudevclient.c \
403         extras/gudev/gudevdevice.h \
404         extras/gudev/gudevdevice.c \
405         extras/gudev/gudevenumerator.h \
406         extras/gudev/gudevenumerator.c \
407         extras/gudev/gudevprivate.h
408
409 dist_extras_gudev_libgudev_1_0_la_SOURCES = \
410         extras/gudev/gudevmarshal.h \
411         extras/gudev/gudevmarshal.c \
412         extras/gudev/gudevenumtypes.h \
413         extras/gudev/gudevenumtypes.c
414 BUILT_SOURCES += $(dist_extras_gudev_libgudev_1_0_la_SOURCES)
415
416 extras_gudev_libgudev_1_0_la_CPPFLAGS = \
417         $(AM_CPPFLAGS) \
418         -I$(top_builddir)/extras \
419         -I$(top_srcdir)/extras \
420         -I$(top_builddir)/extras/gudev \
421         -I$(top_srcdir)/extras/gudev \
422         -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
423         -D_GUDEV_COMPILATION \
424         -DG_LOG_DOMAIN=\"GUdev\"
425
426 extras_gudev_libgudev_1_0_la_CFLAGS = \
427         -fvisibility=default \
428         $(GLIB_CFLAGS)
429
430 extras_gudev_libgudev_1_0_la_LIBADD = libudev/libudev.la $(GLIB_LIBS)
431
432 extras_gudev_libgudev_1_0_la_LDFLAGS = \
433         -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
434         -export-dynamic -no-undefined \
435         -export-symbols-regex '^g_udev_.*'
436
437 EXTRA_DIST += \
438         extras/gudev/COPYING \
439         extras/gudev/gudevmarshal.list \
440         extras/gudev/gudevenumtypes.h.template \
441         extras/gudev/gudevenumtypes.c.template \
442         extras/gudev/gjs-example.js \
443         extras/gudev/seed-example-enum.js \
444         extras/gudev/seed-example.js
445
446 extras/gudev/gudevmarshal.h: extras/gudev/gudevmarshal.list
447         $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
448
449 extras/gudev/gudevmarshal.c: extras/gudev/gudevmarshal.list
450         $(AM_V_GEN)echo "#include \"gudevmarshal.h\"" > $@ && \
451         glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
452
453 extras/gudev/gudevenumtypes.h: extras/gudev/gudevenumtypes.h.template extras/gudev/gudevenums.h
454         $(AM_V_GEN)glib-mkenums --template $^ > \
455             $@.tmp && mv $@.tmp $@
456
457 extras/gudev/gudevenumtypes.c: extras/gudev/gudevenumtypes.c.template extras/gudev/gudevenums.h
458         $(AM_V_GEN)glib-mkenums --template $^ > \
459             $@.tmp && mv $@.tmp $@
460
461 if ENABLE_INTROSPECTION
462 extras/gudev/GUdev-1.0.gir: extras/gudev/libgudev-1.0.la $(G_IR_SCANNER)
463         $(AM_V_GEN)$(G_IR_SCANNER) -v \
464                 --warn-all \
465                 --namespace GUdev \
466                 --nsversion=1.0 \
467                 --include=GObject-2.0 \
468                 --library=gudev-1.0 \
469                 --library-path=$(top_builddir)/libudev \
470                 --library-path=$(top_builddir)/extras/gudev \
471                 --output $@ \
472                 --pkg=glib-2.0 \
473                 --pkg=gobject-2.0 \
474                 -I$(top_srcdir)/extras \
475                 -I$(top_builddir)/extras \
476                 -D_GUDEV_COMPILATION \
477                 -D_GUDEV_WORK_AROUND_DEV_T_BUG \
478                 $(top_srcdir)/extras/gudev/gudev.h \
479                 $(top_srcdir)/extras/gudev/gudevtypes.h \
480                 $(top_srcdir)/extras/gudev/gudevenums.h \
481                 $(or $(wildcard $(top_builddir)/extras/gudev/gudevenumtypes.h),$(top_srcdir)/extras/gudev/gudevenumtypes.h) \
482                 $(top_srcdir)/extras/gudev/gudevclient.h \
483                 $(top_srcdir)/extras/gudev/gudevdevice.h \
484                 $(top_srcdir)/extras/gudev/gudevenumerator.h \
485                 $(top_srcdir)/extras/gudev/gudevclient.c \
486                 $(top_srcdir)/extras/gudev/gudevdevice.c \
487                 $(top_srcdir)/extras/gudev/gudevenumerator.c
488
489 extras/gudev/GUdev-1.0.typelib: extras/gudev/GUdev-1.0.gir $(G_IR_COMPILER)
490         $(AM_V_GEN)g-ir-compiler $< -o $@
491
492 girdir = $(GIRDIR)
493 gir_DATA = extras/gudev/GUdev-1.0.gir
494
495 typelibsdir = $(GIRTYPELIBDIR)
496 typelibs_DATA = extras/gudev/GUdev-1.0.typelib
497
498 CLEANFILES += $(gir_DATA) $(typelibs_DATA)
499 endif # ENABLE_INTROSPECTION
500
501 # move lib from $(libdir) to $(rootlib_execdir) and update devel link, if needed
502 libgudev-install-move-hook:
503         if test "$(libdir)" != "$(rootlib_execdir)"; then \
504                 mkdir -p $(DESTDIR)$(rootlib_execdir) && \
505                 so_img_name=$$(readlink $(DESTDIR)$(libdir)/libgudev-1.0.so) && \
506                 so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
507                 ln -sf $$so_img_rel_target_prefix$(rootlib_execdir)/$$so_img_name $(DESTDIR)$(libdir)/libgudev-1.0.so && \
508                 mv $(DESTDIR)$(libdir)/libgudev-1.0.so.* $(DESTDIR)$(rootlib_execdir); \
509         fi
510
511 libgudev-uninstall-move-hook:
512         rm -f $(DESTDIR)$(rootlib_execdir)/libgudev-1.0.so*
513
514 INSTALL_EXEC_HOOKS += libgudev-install-move-hook
515 UNINSTALL_EXEC_HOOKS += libgudev-uninstall-move-hook
516 endif
517
518 if ENABLE_KEYMAP
519 # ------------------------------------------------------------------------------
520 # keymap - map custom hardware's multimedia keys
521 # ------------------------------------------------------------------------------
522 extras_keymap_keymap_SOURCES = extras/keymap/keymap.c
523 extras_keymap_keymap_CPPFLAGS = $(AM_CPPFLAGS) -I extras/keymap
524 nodist_extras_keymap_keymap_SOURCES = \
525         extras/keymap/keys-from-name.h \
526         extras/keymap/keys-to-name.h
527 BUILT_SOURCES += $(nodist_extras_keymap_keymap_SOURCES)
528
529 EXTRA_DIST += extras/keymap/check-keymaps.sh
530 dist_udevrules_DATA += extras/keymap/95-keymap.rules
531 dist_udevrules_DATA += extras/keymap/95-keyboard-force-release.rules
532 libexec_PROGRAMS += extras/keymap/keymap
533 dist_libexec_SCRIPTS += extras/keymap/findkeyboards
534 dist_libexec_SCRIPTS += extras/keymap/keyboard-force-release.sh
535 dist_doc_DATA = extras/keymap/README.keymap.txt
536 CLEANFILES += \
537         extras/keymap/keys.txt \
538         extras/keymap/keys-from-name.gperf
539
540 udevkeymapdir = $(libexecdir)/keymaps
541 dist_udevkeymap_DATA = \
542         extras/keymap/keymaps/acer \
543         extras/keymap/keymaps/acer-aspire_5720 \
544         extras/keymap/keymaps/acer-aspire_8930 \
545         extras/keymap/keymaps/acer-aspire_5920g \
546         extras/keymap/keymaps/acer-aspire_6920 \
547         extras/keymap/keymaps/acer-travelmate_c300 \
548         extras/keymap/keymaps/asus \
549         extras/keymap/keymaps/compaq-e_evo \
550         extras/keymap/keymaps/dell \
551         extras/keymap/keymaps/dell-latitude-xt2 \
552         extras/keymap/keymaps/everex-xt5000 \
553         extras/keymap/keymaps/fujitsu-amilo_pa_2548 \
554         extras/keymap/keymaps/fujitsu-amilo_pro_edition_v3505 \
555         extras/keymap/keymaps/fujitsu-amilo_pro_v3205 \
556         extras/keymap/keymaps/fujitsu-amilo_si_1520 \
557         extras/keymap/keymaps/fujitsu-esprimo_mobile_v5 \
558         extras/keymap/keymaps/fujitsu-esprimo_mobile_v6 \
559         extras/keymap/keymaps/hewlett-packard \
560         extras/keymap/keymaps/hewlett-packard-2510p_2530p \
561         extras/keymap/keymaps/hewlett-packard-compaq_elitebook \
562         extras/keymap/keymaps/hewlett-packard-pavilion \
563         extras/keymap/keymaps/hewlett-packard-presario-2100 \
564         extras/keymap/keymaps/hewlett-packard-tablet \
565         extras/keymap/keymaps/hewlett-packard-tx2 \
566         extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
567         extras/keymap/keymaps/inventec-symphony_6.0_7.0 \
568         extras/keymap/keymaps/lenovo-3000 \
569         extras/keymap/keymaps/lenovo-ideapad \
570         extras/keymap/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint \
571         extras/keymap/keymaps/lenovo-thinkpad_x6_tablet \
572         extras/keymap/keymaps/lenovo-thinkpad_x200_tablet \
573         extras/keymap/keymaps/lg-x110 \
574         extras/keymap/keymaps/logitech-wave \
575         extras/keymap/keymaps/logitech-wave-cordless \
576         extras/keymap/keymaps/logitech-wave-pro-cordless \
577         extras/keymap/keymaps/maxdata-pro_7000 \
578         extras/keymap/keymaps/medion-fid2060 \
579         extras/keymap/keymaps/medionnb-a555 \
580         extras/keymap/keymaps/micro-star \
581         extras/keymap/keymaps/module-asus-w3j \
582         extras/keymap/keymaps/module-ibm \
583         extras/keymap/keymaps/module-lenovo \
584         extras/keymap/keymaps/module-sony \
585         extras/keymap/keymaps/module-sony-old \
586         extras/keymap/keymaps/module-sony-vgn \
587         extras/keymap/keymaps/olpc-xo \
588         extras/keymap/keymaps/onkyo \
589         extras/keymap/keymaps/oqo-model2 \
590         extras/keymap/keymaps/samsung-other \
591         extras/keymap/keymaps/samsung-sq1us \
592         extras/keymap/keymaps/samsung-sx20s \
593         extras/keymap/keymaps/toshiba-satellite_a100 \
594         extras/keymap/keymaps/toshiba-satellite_a110 \
595         extras/keymap/keymaps/toshiba-satellite_m30x \
596         extras/keymap/keymaps/zepto-znote
597
598 udevkeymapforcereldir = $(libexecdir)/keymaps/force-release
599 dist_udevkeymapforcerel_DATA = \
600         extras/keymap/force-release-maps/dell-touchpad \
601         extras/keymap/force-release-maps/hp-other \
602         extras/keymap/force-release-maps/samsung-other \
603         extras/keymap/force-release-maps/common-volume-keys
604
605 extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h
606         $(AM_V_at)mkdir -p extras/keymap
607         $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
608
609 extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt
610         $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
611
612 extras/keymap/keys-from-name.h: extras/keymap/keys-from-name.gperf Makefile
613         $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
614
615 extras/keymap/keys-to-name.h: extras/keymap/keys.txt Makefile
616         $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
617
618 keymaps-distcheck-hook: extras/keymap/keys.txt
619         $(top_srcdir)/extras/keymap/check-keymaps.sh $(top_srcdir) $^
620 DISTCHECK_HOOKS += keymaps-distcheck-hook
621 endif
622
623 if ENABLE_FLOPPY
624 # ------------------------------------------------------------------------------
625 # create_floppy_devices - historical floppy kernel device nodes (/dev/fd0h1440, ...)
626 # ------------------------------------------------------------------------------
627 extras_floppy_create_floppy_devices_SOURCES = extras/floppy/create_floppy_devices.c
628 extras_floppy_create_floppy_devices_LDADD = libudev/libudev-private.la
629 libexec_PROGRAMS += extras/floppy/create_floppy_devices
630 dist_udevrules_DATA += extras/floppy/60-floppy.rules
631 endif
632
633 if ENABLE_EDD
634 # ------------------------------------------------------------------------------
635 # edd_id - create /dev/disk/by-id/edd-* links for BIOS EDD data
636 # ------------------------------------------------------------------------------
637 extras_edd_id_edd_id_SOURCES = extras/edd_id/edd_id.c
638 extras_edd_id_edd_id_LDADD = libudev/libudev-private.la
639 libexec_PROGRAMS += extras/edd_id/edd_id
640 dist_udevrules_DATA += extras/edd_id/61-persistent-storage-edd.rules
641 endif
642
643 # ------------------------------------------------------------------------------
644 # install, uninstall, clean hooks
645 # ------------------------------------------------------------------------------
646 clean-local:
647         rm -rf udev-test-install
648
649 distclean-local:
650         rm -rf autom4te.cache
651
652 CLEANFILES += \
653         udev-$(VERSION).tar.gz \
654         udev-$(VERSION).tar.bz2 \
655         $(BUILT_SOURCES)
656
657 EXTRA_DIST += $(TESTS)
658 EXTRA_DIST += test/rule-syntax-check.py
659
660 install-exec-hook: $(INSTALL_EXEC_HOOKS)
661
662 install-data-hook: $(INSTALL_DATA_HOOKS)
663
664 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
665
666 distcheck-hook: $(DISTCHECK_HOOKS)
667
668 # ------------------------------------------------------------------------------
669 # custom release helpers
670 # ------------------------------------------------------------------------------
671 PREVIOUS_VERSION = `expr $(VERSION) - 1`
672 changelog:
673         @ head -1 ChangeLog | grep -q "to v$(PREVIOUS_VERSION)"
674         @ mv ChangeLog ChangeLog.tmp
675         @ echo "Summary of changes from v$(PREVIOUS_VERSION) to v$(VERSION)" >> ChangeLog
676         @ echo "============================================" >> ChangeLog
677         @ echo >> ChangeLog
678         @ git log --pretty=short $(PREVIOUS_VERSION)..HEAD | git shortlog  >> ChangeLog
679         @ echo >> ChangeLog
680         @ cat ChangeLog
681         @ cat ChangeLog.tmp >> ChangeLog
682         @ rm ChangeLog.tmp
683
684 test-install:
685         rm -rf $(PWD)/udev-test-install/
686         make DESTDIR=$(PWD)/udev-test-install install
687         tree $(PWD)/udev-test-install/
688
689 git-release:
690         head -1 ChangeLog | grep -q "to v$(VERSION)"
691         head -1 NEWS | grep -q "udev $(VERSION)"
692         git commit -a -m "release $(VERSION)"
693         git tag $(VERSION)
694         git gc --prune=0
695
696 git-sync:
697         git push
698         git push --tags $(VERSION)
699
700 tar-sync:
701         scp udev-$(VERSION).tar.gz master.kernel.org:/pub/linux/utils/kernel/hotplug/
702
703 doc-sync:
704         rsync -av udev/*.html master.kernel.org:/pub/linux/utils/kernel/hotplug/udev/
705         rsync -av --delete libudev/docs/html/ master.kernel.org:/pub/linux/utils/kernel/hotplug/libudev/
706         rsync -av --delete extras/gudev/docs/html/ master.kernel.org:/pub/linux/utils/kernel/hotplug/gudev/