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