{"id":15015350,"url":"https://github.com/perl/metaconfig","last_synced_at":"2025-07-26T13:37:19.137Z","repository":{"id":43053011,"uuid":"106684400","full_name":"Perl/metaconfig","owner":"Perl","description":"Perl 5 Metaconfig","archived":false,"fork":false,"pushed_at":"2025-01-18T22:06:57.000Z","size":2823,"stargazers_count":15,"open_issues_count":12,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-30T07:11:39.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/Perl.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-12T11:33:40.000Z","updated_at":"2024-12-30T09:11:54.000Z","dependencies_parsed_at":"2024-09-28T18:41:02.735Z","dependency_job_id":"bbd3a353-6002-4593-9a4a-8f8d7d20f777","html_url":"https://github.com/Perl/metaconfig","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perl%2Fmetaconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perl%2Fmetaconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perl%2Fmetaconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Perl%2Fmetaconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Perl","download_url":"https://codeload.github.com/Perl/metaconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237224769,"owners_count":19275084,"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":[],"created_at":"2024-09-24T19:46:56.722Z","updated_at":"2025-02-05T01:31:15.140Z","avatar_url":"https://github.com/Perl.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"  Jarkko's How to build Configure tweaked by Nick and Merijn, and now\n                 maintained by perl5-metaconfig\n\nThe Configure script and config_h.SH file in the Perl distribution are\ngenerated by a program called metaconfig.  Metaconfig was originally\nwritten by Larry Wall, and was subsequently enhanced and maintained\nby Raphael Manfredi. The binary that invokes the generation of the\nConfigure file is called mconfig.\n\nAs sort order and filenaming are vital in this process, make sure you\nare working on a case-sensitive file system! (Case preserving is not\nsufficient).\n\nYou have presumably obtained the metaconfig from the repository e.g.\n\n  $ git clone git@github.com:Perl/metaconfig metaconfig\n\nWhen working with metaconfig you will generally have two git checkouts\nnext to each other:  (1) this metaconfig checkout; and (2) a checkout of\nthe Perl source code in which you will generate a new Configure script. In this\nREADME, we will refer to these directories as the 'metaconfig' directory and\nthe 'perl' directory.\n\nSince these two directories are normally next to each other, so ../perl\nwill get you to perl and ../perl/../metaconfig will get you back here.\nYou should establish a symbolic link to the checkout in which Configure\nis generated such as this:\n\n  $ cd metaconfig\n  $ ln -s ../perl perl\n\nWe will do the reverse symlinks later.\n\nContents of this directory:\n\n    README:\tThis file.\n    U:\t\tMetaconfig units used for building Perl's Configure\n    dist-git:\n\t\ta git clone of \"dist\". Optionally present. See (a) below.\n\t\tThis is where dist/meta resides as of 2016-04-01\n    dist:\n\t\tThe folder where the original units from dist are in.\n\t\tThese may differ from dist-git, as upstream also moves\n\t\ton and develops.\n\nDevelopment workflow:\n\n(a) In order to assemble Configure from its units, you need mlint/metalint and\n    mconfig/metaconfig from the \"dist\" package installed and available in your\n    $PATH. You can either use the version that comes with your OS (Debian ships\n    it) or the versions that are included in this checkout: just add the full\n    name of this folder/bin to your $PATH. If you are not planning to analyse\n    differences of the current state with upstream dist, you can skip the rest\n    of step (a) now.\n\n    If you also want to play with or compare to the original meta/dist, you\n    can checkout that too.\n\n    The dist version used for perl is dist-3.5-20 in this directory, which is\n    a slightly modified version of the original, which you can get at GITHUB\n    repository https://github.com/rmanfredi/dist.git. If you'd like to keep\n    up to date with changes in dist, you can use git to create your own clone.\n    For git, that would be something like:\n\n    $ git clone https://github.com/rmanfredi/dist.git dist-git\n\n    Unsurprisingly 'dist' uses (its) Configure to generate itself:\n\n    $ cd dist-3.5-20\t# or dist-git\n    $ chmod -R +w .     # We have derived files in git :-(\n    $ ./Configure\n    $ make\n    $ make install\n\n    After make install, remove lib/U/d_debugging.U in your target lib, as perl\n    uses its own way to set/define debugging (see INSTALL)\n\n    dist's 'Configure' is similar to perl's but perhaps not quite as polished.\n\n    There are some perl specific \"dist units\" in the 'U' directory.\n    The U directory also contains some patches to 'dist' which have already\n    been applied to dist-3.5-20 directory.\n\n(aa) We have not yet arranged for metaconfig to use perl's versions of the\n    'units' by default so you need some housekeeping in the perl directory...\n\n    Add metaconfig/bin to your $PATH or create aliases like\n\n    $ export MC5=/your/path/to/metaconfig\n    $ alias ml=\"perl $MC5/bin/mlint -O\"\n    $ alias mc=\"perl $MC5/bin/mconfig -m -O\"\n\n    examples in the rest of this README will just refer to mlint and mconfig\n    as if they appear in your $PATH\n\n(aaa)\n\n    If you plan to make changes to mconfig or mlint locally (and you might\n    want to, as both are written for perl4), consider installing mconfig and\n    mlint from the cmon subdirectory into your $PATH too. These are the\n    non-autoloading versions and can easily be changed. As these are used by\n    all team members, please communicate changes on github first.\n\n(b) You need to be in the 'perl' checkout directory, which you created the\n    symbolic link to, in preparation. In this working directory, you need\n    symbolic links too, which are already known to perl itself to ignore.\n    Assuming you have metaconfig and perl side by side on the same level:\n        ln -s ../metaconfig/U U\n        ln -s ../metaconfig/.package .package\n        ln -s MANIFEST MANIFEST.new\n        chmod +w Configure config_h.SH Porting/Glossary Porting/config*\n\n(c) Create a new file for the unit as U/foo/d_bar.U\n    ('foo' is one of the existing folders in U except for 'all'.  If you are\n    modifying a unit already in dist, simply copy the dist version to\n    'modified' as a starting point.  Otherwise, create a new file in one of the\n    other directories.  It most likely will be 'perl', but it could also be\n    'compline' or any other existing folder).  Choose the best appropriate\n    subdir of U.  See U/README for a description of the various subdirectories.\n    You should choose the closest existing unit file as a starting point, and\n    first copy it to the new file.  For example, the unit for seeing if\n    strtold_l() exists was created as U/threads/d_strtold_l.U, copied from\n    perl/d_strtold.U, then adjusted.  It goes under 'threads' because it is\n    used only on threaded perls.\n\n(d) Run \"mlint -O\" to see nits: as opposed to lint, the gripings of mlint\n    are usually serious and need fixing\n\n    Without -O, exceptions are lots of\n      Your private U/modified/issymlink.U overrides the public one.\n    due to the perl special units\n\n    and\n\n    \"End.U\": stale ?MAKE: dependency '$W'.\n\n    which is apparently normal ...\n\n-- the next steps are in the perl folder, though the instructions below include\n   a 'cd perl' at each step, as a reminder.  If you already are in 'perl',\n   disregard the reminders.\n\n(e) There is a chicken and egg problem for newly created units.  To get around\n    this, for such a unit, edit the file metaconfig.h and add to the comment\n    the appropropriate name.  To continue the example above, we would add the\n    string HAS_STRTOLD_L at the end of the comment.  This can be removed once\n    the code base has actual uses of the unit.\n\n(f) \"mconfig -m -O\" to regenerate Configure and config_h.SH\n\n    Make *sure* your mconfig is the correct one in your $PATH, as the mono-web\n    package will install /usr/bin/mconfig which will do something completely\n    different.\n\n(g) metaconfig does not deal with depends in config_h.SH, so some\n    reorganization is needed.\n\n    $ cd perl\n    $ perl Porting/config_h.pl\n\n    will fix the ordering\n\n(h) The messy semi-automated part is that the knowledge of the new symbol\n    needs to be propagated to non-Configure lands like Win32, WinCE, Netware,\n    VMS, VOS, ...  see previous Configure changes to see which are these\n    heathen lands.  Files to take care of are\n    {win32,wince,NetWare}/config_[hH]*, (Win32, WinCE, NetWare),\n    configure.com (VMS).  Depending on the kind of patch djgpp/config* might\n    also need adjusting (for example when adding/changing the list of\n    extensions)\n\n    Most can be checked and updated by a tool Nicholas provided:\n\n      $ cd perl\n      $ perl Porting/checkcfgvar.pl\n\n    and if it shows differences, use one of:\n\n      $ perl Porting/checkcfgvar.pl --regen --default=undef\n      $ perl Porting/checkcfgvar.pl --regen --default=define\n\n    based on the changes you made.  For safety, probes should probably be\n    'undef', whereas some other things unconditionally should default to\n    'define'.  For example, 'default_inc_excludes_dot' should be 'define'\n    except in very limited circumstances, because it closes a security hole.\n\n    For Win32 the process is semi-automated.  You have to have a Win32\n    machine to run dmake on to complete the process, but that can be done\n    later by someone with such access.\n\n    For VMS, ('configure.com'), you will have to add things manually.  It may\n    be best to add the units as 'undef' and let the VMS experts deal with them\n    later.  However, you can set them to 'define' if they are non-tricky (such\n    as being basic functions having standard signatures across architectures),\n    and are in the oldest release of VMS that perl can be compiled on, which is\n    7.3-2.  Appendix A of \"HP C Run-Time Library Reference Manual for OpenVMS\n    Systems\" gives you that information.  As of October 2017, the latest\n    version online is available at:\n    http://h41379.www4.hpe.com/doc/84final/5763/5763profile.html\n\n    In configure.com, if there is an existing probe that is essentially the\n    same (except for the names) as the one you're adding, you can copy, paste,\n    and adjust to create a new one, but note that it's easy to run afoul of the\n    quoting rules in configure.com.  New probed-for units likely will require\n    at least 2 groups of changes.\n\n    Rerun checkcfgvar.pl until you've fixed everything it finds.\n\n(i) Check if U/mkglossary (right near the top) points to where you keep\n    dist's standard metaconfig units as well as your perl-specific ones.\n\n(j) Run the perl build chain\n\n    $ cd perl\n    $ make veryclean    # Only if Configure already has been run\n    $ ./Configure -Duse64bitall -Dusethreads -Dusedevel -des\n\n    Then make and make test or make test_harness\n\n    $ make -j12\n    $ env TEST_JOBS=13 make test_harness\n\n    Before you start committing, make sure that\n\n    $ make test_porting\n\n    still passes\n\n(k) Optionally, run Porting/mksample to freshen the Porting/config*.\n    Adjust the various compile-time options (e.g. 64bit, threads) as\n    you see fit.\n    You can skip this step, it's not essential, just good housekeeping.\n\n    Most of this only works if you have run the core-tests with the new\n    generated files\n\n(kk) Run U/mkgloss.pl to freshen Porting/Glossary\n\n    You should at least check\n\n    $ perl U/mkgloss.pl | diff Porting/Glossary -\n\n    This will show two warnings that you can ignore:\n\n    U/mkglossary: couldn't find libdb_needs_pthread\n    U/mkglossary: couldn't find libdirs\n\n    all other things need a review\n\n-- the next steps are in the metaconfig folder again\n\n(l) git add U/foo/bar.U when you are ready ...\n\n(m) git commit -m \"Your commit description\"\n\n(n) When all patches are applied, tested and committed, and you are happy,\n    git push\n\nReferences:\n\nDocumentation on 'dist' may be found at these locations:\nhttps://github.com/rmanfredi/dist/blob/master/mcon/man/mconfig.SH\nhttps://manpages.debian.org/stretch/dist/metaconfig.1.en.html\n\nGit tags:\n\nTags are maintained in this git repository mapping the version of the\nunits that were used for the Configure in a given release of perl,\nnamed simply after the version of perl in question (for example, at\nthe time of writing the current stable release is 5.26.1). This provides\na stable reference for downstreams wishing to import the metaconfig units\ninto their own packaging. Therefore, at minimum tags for each stable\nrelease should be made (adding tags for development releases being an\noptional extra).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperl%2Fmetaconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperl%2Fmetaconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperl%2Fmetaconfig/lists"}