{"id":15576198,"url":"https://github.com/mwichmann/lsbspec","last_synced_at":"2026-01-06T16:19:45.102Z","repository":{"id":81484871,"uuid":"76282269","full_name":"mwichmann/lsbspec","owner":"mwichmann","description":"Linux Standard Base Specification (mirror)","archived":false,"fork":false,"pushed_at":"2016-12-25T20:26:41.000Z","size":398030,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T14:46:37.432Z","etag":null,"topics":["linux-standard","lsb","specification"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mwichmann.png","metadata":{"files":{"readme":"README.m4files","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"Security/contents","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-12T18:07:12.000Z","updated_at":"2018-09-27T19:10:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"dc677592-fce0-4e27-9d6e-2f55078a542b","html_url":"https://github.com/mwichmann/lsbspec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwichmann%2Flsbspec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwichmann%2Flsbspec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwichmann%2Flsbspec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mwichmann%2Flsbspec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mwichmann","download_url":"https://codeload.github.com/mwichmann/lsbspec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245661186,"owners_count":20651838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux-standard","lsb","specification"],"created_at":"2024-10-02T18:42:33.942Z","updated_at":"2026-01-06T16:19:45.075Z","avatar_url":"https://github.com/mwichmann.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"The LSB specification uses a lot of files suffixed .m4.  These exist to\nallow a little bit of macro processing, and to do file inclusion, using\nthe m4 tool.\n\nA pretty typical setup is Toolkit_Gtk/generic/GTK:\n\nThis directory contains some manually written specification text\n(the list enumerated by MANPAGES in the makefile), as well as some\nfiles generated from the specification database by script (this list\nis enumerated by TABLES).  However, the objective is to produce just a\nsingle docbook file for use in processing.\n\nThis is done using a template file, named GTK.m4 here.  It contains\ndocbook markup for the overall chapter, and some lines which look like:\n\n    m4_include(libGlib.sgml)\n\nThese are used to build the eventual output file, the product of all\nthis work, GTK.sgml.  It should be noted that the generated TABLES files \nmay themselves contain further m4 instructions - this\nhappens when the generator script notices that an interface contained\nwithin that library is marked as being documented by LSB - it will\nthen attempt to include the appropriate file - which should be one of\nthe MANPAGES files.  If the file does not exist, the generator emits\na comment instead.  Examples of both:\n\n    m4_sinclude(m4_ifdef('g_cache_value_foreach','',g_cache_value_foreach.sgml))\n    m4_define('g_cache_value_foreach','1')\n\n    \u003c!-- MISSING DEFINITION FOR g_once_init_enter_impl --\u003e\n    \u003c!-- Lets just hope nobody notices --\u003e\n\nThe m4 files can also do some macro processing with the idea of reducing\nduplication of files - if there is some wording that should be in the\ngeneric valume and be different in the arch-specific volumes, this can\nalso be handled. Example is from LSB/generic/intro/intro.m4:\n\n   m4_ifelse(ARCH,`All', `\n   \u003c!-- the ID below is for auto generated xrefs to the LSB itself --\u003e\n   \u003cpara id=STD.LSB xreflabel=\"This Specification\"\u003e',`\u003cpara\u003e')\n\nThe makefiles then do appropriate things to set these. Generic:\n\n    m4 -P -Uindex -Uformat -DARCH=All -DCORE=1 intro.m4 \u003eintro.sgml\n\nand x86-64:\n\n    m4 -P -Uindex -Uformat -DARCH=x86-64 intro.m4 \u003eintro.sgml\n\nSo now the reason for creating this note: where care has been taken\nto create multi-use m4 files, they should be kept that way.  If you\nhave a submodule which contains arch-specifics, you will have eight\nseparate directories. If they can share an m4 file, put it only in\ngeneric, and add rules to the makefiles in the arch-specific directories\nto pick it up as needed:\n\n    # change this if all the books stop sharing the same m4 file\n    intro.m4::\n            cp ../../generic/intro/$@ .\n\nand then add a rule to make sure the copied file can be removed:\n\n    spotless: clean\n\t    rm -f $(TABLES) intro.m4\n\nDO NOT check in the copied files, then you'll risk the files going\nout of skew with each other, someone will modify the one in generic\nand the other directories won't pick up the changes.\n\nRecently had to sweep through the spec and clean out a whole bunch\nof these.\n\nNote there are cases when the m4 files do differ.  For example, in\nDesktop, the module contains both generic submodules and ones with\narch-specific pieces.  When the appendix list of interfaces is built,\nthe generic one gets everything, the arch-specific ones get only the\ninterfaces for the libraries which have arch-speicific pieces.  So here\nthey include different lists of files.  Yes, work could be done with\nthe m4 macro trick noted above to keep the file common across all eight.\nMaybe someday.  There are certainly also cases where different wording\nis wanted. Again, it /could/ be handled with macros.  One pain with\nthe m4 macros that discourages excess use is that the start and end \ndelimiters for a piece of text are different, this makes it a little\nharder on matching tools in editors, and syntax-higlighting editors\ndon't seem to recognize m4 usage.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwichmann%2Flsbspec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwichmann%2Flsbspec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwichmann%2Flsbspec/lists"}