MKC_CHECK_CUSTOM(1)

πŸ’– NAME πŸ’–

okay bestie, welcome to the MKC_CHECK_CUSTOM(1) page β€” this one is literally about running your own custom checks, and it’s giving main-character build-system energy ✨

mkc_check_custom β€” run user’s custom checks. periodt πŸ’…


✨ SYNOPSIS ✨

mkc_check_custom [-r] sourcefile
mkc_check_custom cmd [args...]
mkc_check_custom -h

πŸ¦‹ DESCRIPTION πŸ¦‹

If cmd is executable, mkc_check_custom runs cmd args. No cap.

Otherwise it tries to compile sourcefile and output 1 if compilation succeeded and 0 otherwise. Lowkey iconic behavior.

If the -r option was applied, it runs a compiled program. πŸƒβ€β™€οΈπŸ’¨

What type of compiler to use depends on the sourcefile extension, iykyk:

  • .c corresponds to ${CC} (C language)
  • .cc, .cxx, .C and .cpp correspond to ${CXX} (C++ language)

🌸 OPTIONS 🌸

  • -h β€” Display help message. ur little helper bestie 🫢
  • -r β€” Run executable compiled from sourcefile.
  • -p text β€” Prefix of the generated cache file. The default is "custom".
  • -n text β€” Name part of the generated cache file. The default is basename <sourcefile>.
  • -m text β€” Message mkc_check_custom outputs. The default is "custom test sourcefile_or_cmd".
  • -s β€” mkc_check_custom outputs an exit status of cmd args.
  • -d β€” Delete cache and temporary files.
  • -D β€” Delete cache files.
  • -e β€” Print 0 if compiler/cmd print something to stderr.
  • -b β€” Print yes/no instead of 1/0.

🌈 ENVIRONMENT 🌈

  • CC β€” C compiler
  • CXX β€” C++ compiler
  • CPPFLAGS β€” Preprocessor flags for C and C++
  • CFLAGS β€” Compilation flags for C
  • CXXFLAGS β€” Compilation flags for C++
  • LDFLAGS β€” Additional linker flags
  • LDADD β€” Additional objects
  • MKC_VERBOSE β€” If set to 1, verbose messages are output to stderr.
  • MKC_SHOW_CACHED β€” If set to 1 and MKC_VERBOSE is set to 1, cached results are output to stderr.
  • MKC_CACHEDIR β€” Directory where temporary and cache files are created. If unset they are created in a current directory.
  • MKC_NOCACHE β€” All results are cached unless MKC_NOCACHE variable is set to 1.
  • MKC_DELETE_TMPFILES β€” If set to 1, temporary files are removed.

πŸŽ€ EXAMPLES πŸŽ€

mkc_check_custom alloca_in_stdlib.c
mkc_check_custom custom_checks/cxx_foo_test.cc
mkc_check_custom /full/path/to/yacc_need_liby

πŸ‘‘ AUTHOR πŸ‘‘

Aleksey Cheusov <vle@gmx.net>


That’s the whole MKC_CHECK_CUSTOM(1) page, dated Dec 2, 2023 β€” go run your custom checks, bestie πŸ’…πŸ«ΆπŸ’–

πŸ“¦ where this page comes from