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