325
334
# Ensure that no C source file, docs, or rng schema uses TABs for
326
335
# indentation. Also match *.h.in files, to get libvirt.h.in. Exclude
327
336
# files in gnulib, since they're imported.
337
space_indent_files=(\.(rng|s?[ch](\.in)?|html.in|py)|(daemon|tools)/.*\.in)
328
338
sc_TAB_in_indentation:
329
339
@prohibit='^ * ' \
330
in_vc_files='(\.(rng|[ch](\.in)?|html.in)|(daemon|tools)/.*\.in)$$' \
331
halt='use leading spaces, not TAB, in C, sh, html, and RNG schemas' \
340
in_vc_files='$(space_indent_files)$$' \
341
halt='indent with space, not TAB, in C, sh, html, py, and RNG schemas' \
332
342
$(_sc_search_regexp)
334
344
ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
365
380
msg_gen_function =
366
381
msg_gen_function += ESX_ERROR
367
382
msg_gen_function += ESX_VI_ERROR
383
msg_gen_function += PHYP_ERROR
384
msg_gen_function += VIR_ERROR
385
msg_gen_function += VIR_ERROR0
386
msg_gen_function += VMX_ERROR
387
msg_gen_function += XENXS_ERROR
388
msg_gen_function += eventReportError
389
msg_gen_function += ifaceError
390
msg_gen_function += interfaceReportError
391
msg_gen_function += iptablesError
392
msg_gen_function += lxcError
393
msg_gen_function += libxlError
368
394
msg_gen_function += macvtapError
369
msg_gen_function += remoteError
370
msg_gen_function += lxcError
371
msg_gen_function += networkLog
372
395
msg_gen_function += networkReportError
373
msg_gen_function += oneError
396
msg_gen_function += nodeReportError
374
397
msg_gen_function += openvzError
398
msg_gen_function += pciReportError
375
399
msg_gen_function += qemuReportError
376
400
msg_gen_function += qemudDispatchClientFailure
377
401
msg_gen_function += regerror
402
msg_gen_function += remoteError
378
403
msg_gen_function += remoteDispatchFormatError
404
msg_gen_function += statsError
405
msg_gen_function += streamsReportError
406
msg_gen_function += usbReportError
379
407
msg_gen_function += umlReportError
380
408
msg_gen_function += vah_error
381
409
msg_gen_function += vah_warning
382
410
msg_gen_function += vboxError
383
411
msg_gen_function += virCommandError
384
412
msg_gen_function += virConfError
413
msg_gen_function += virCPUReportError
414
msg_gen_function += virEventError
385
415
msg_gen_function += virDomainReportError
416
msg_gen_function += virGenericReportError
386
417
msg_gen_function += virHashError
418
msg_gen_function += virHookReportError
419
msg_gen_function += virInterfaceReportError
420
msg_gen_function += virJSONError
387
421
msg_gen_function += virLibConnError
388
422
msg_gen_function += virLibDomainError
423
msg_gen_function += virLibDomainSnapshotError
424
msg_gen_function += virLibInterfaceError
425
msg_gen_function += virLibNetworkError
426
msg_gen_function += virLibNodeDeviceError
427
msg_gen_function += virLibNWFilterError
428
msg_gen_function += virLibSecretError
429
msg_gen_function += virLibStoragePoolError
430
msg_gen_function += virLibStorageVolError
389
431
msg_gen_function += virNetworkReportError
390
432
msg_gen_function += virNodeDeviceReportError
433
msg_gen_function += virNWFilterReportError
391
434
msg_gen_function += virRaiseError
392
435
msg_gen_function += virReportErrorHelper
393
436
msg_gen_function += virReportSystemError
437
msg_gen_function += virSecretReportError
394
438
msg_gen_function += virSecurityReportError
395
439
msg_gen_function += virSexprError
440
msg_gen_function += virSmbiosReportError
441
msg_gen_function += virSocketError
442
msg_gen_function += virStatsError
396
443
msg_gen_function += virStorageReportError
444
msg_gen_function += virUtilError
397
445
msg_gen_function += virXMLError
398
446
msg_gen_function += virXenInotifyError
399
447
msg_gen_function += virXenStoreError
478
524
halt='do not mark these strings for translation' \
479
525
$(_sc_search_regexp)
481
# Ensure that the syntax_check_exceptions file list in Makefile.am
482
# stays in sync with corresponding files in the repository.
483
sce = syntax_check_exceptions
485
@test "$$( ($(VC_LIST) | sed -n '/\.x-sc_/p' \
486
| sed 's|^$(_dot_escaped_srcdir)/||'; \
487
sed -n '/^$(sce) =[ ]*\\$$/,/[^\]$$/p' \
488
$(srcdir)/Makefile.am \
489
| sed 's/^ *//;/^$(sce) =/d' \
490
| tr -s '\012\\' ' ' | fmt -1 \
491
) | sort | uniq -u)" \
492
&& { echo 'Makefile.am: $(sce) mismatch' >&2; exit 1; } || :;
494
527
# We don't use this feature of maint.mk.
495
528
prev_version_file = /dev/null
548
581
# regenerate HACKING as part of the syntax-check
549
582
syntax-check: $(top_srcdir)/HACKING
584
# List all syntax-check exemptions:
585
exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$
587
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal
588
exclude_file_name_regexp--sc_avoid_write = \
589
^(src/($(_src1))|daemon/libvirtd|tools/console)\.c$$
591
exclude_file_name_regexp--sc_bindtextdomain = ^(tests|examples)/
593
exclude_file_name_regexp--sc_po_check = ^docs/
595
exclude_file_name_regexp--sc_prohibit_VIR_ERR_NO_MEMORY = \
596
^(include/libvirt/virterror\.h|daemon/dispatch\.c|src/util/virterror\.c)$$
598
exclude_file_name_regexp--sc_prohibit_access_xok = ^src/util/util\.c$$
600
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
601
(^docs|^python/(libvirt-override|typewrappers)\.c$$)
603
exclude_file_name_regexp--sc_prohibit_asprintf = \
604
^(bootstrap.conf$$|po/|src/util/util\.c$$|examples/domain-events/events-c/event-test\.c$$)
606
exclude_file_name_regexp--sc_prohibit_can_not = ^po/
608
exclude_file_name_regexp--sc_prohibit_close = \
609
(\.py$$|^docs/|(src/util/files\.c|src/libvirt\.c)$$)
611
exclude_file_name_regexp--sc_prohibit_doubled_word = ^po/
613
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
614
(^docs/api_extension/|^tests/qemuhelpdata/|\.(gif|ico|png)$$)
616
_src2=src/(util/util|libvirt|lxc/lxc_controller)
617
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
618
(^docs|^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
620
exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/util\.c$$
622
exclude_file_name_regexp--sc_prohibit_gettext_noop = ^docs/
624
exclude_file_name_regexp--sc_prohibit_nonreentrant = \
625
^((po|docs|tests)/|tools/(virsh|console)\.c$$)
627
exclude_file_name_regexp--sc_prohibit_readlink = ^src/util/util\.c$$
629
exclude_file_name_regexp--sc_prohibit_sprintf = ^(docs/|HACKING$$)
631
exclude_file_name_regexp--sc_prohibit_strncpy = \
632
^(src/util/util|tools/virsh)\.c$$
634
exclude_file_name_regexp--sc_prohibit_xmlGetProp = ^src/util/xml\.c$$
636
exclude_file_name_regexp--sc_require_config_h = ^examples/
638
exclude_file_name_regexp--sc_require_config_h_first = ^examples/
640
exclude_file_name_regexp--sc_trailing_blank = (^docs/|\.(fig|gif|ico|png)$$)
642
exclude_file_name_regexp--sc_unmarked_diagnostics = \
643
^(docs/apibuild.py|tests/virt-aa-helper-test)$$