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