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