{
    "content": [
        {
            "type": "text",
            "text": "# make-first-existing-target (man)\n\n## NAME\n\nmake-first-existing-target - runs make on one of several targets\n\n## SYNOPSIS\n\nmake-first-existing-target [-c cmd] target1 [target2 ...] -- [make-options]\n\n## DESCRIPTION\n\nThe design of make(1) causes difficulty when you know that a Makefile probably has one of\nseveral standardized target names, and want build machinery to run exactly one of them,\npropagating any errors. make(1) will exit 2 if a target does not exist, but an existing\ntarget may also exit 2 due to some other failure. Makefiles cannot be reliably parsed to find\ntargets by anything less Turing-complete than make, and make itself does not provide a way to\nenumerate the targets in a Makefile. It may not even be possible to enumerate the targets in\na Makefile without executing part of it. (Proof of this is left as an exercise for the\nreader.)\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS**\n- **EXIT STATUS**\n- **AUTHOR**\n- **LICENSE**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "make-first-existing-target",
        "section": "",
        "mode": "man",
        "summary": "make-first-existing-target - runs make on one of several targets",
        "synopsis": "make-first-existing-target [-c cmd] target1 [target2 ...] -- [make-options]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "make",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/make/1/json"
            },
            {
                "name": "MAKE-FIRST-EXISTING-TARGET",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/MAKE-FIRST-EXISTING-TARGET/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "make-first-existing-target - runs make on one of several targets\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "make-first-existing-target [-c cmd] target1 [target2 ...] -- [make-options]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The design of make(1) causes difficulty when you know that a Makefile probably has one of\nseveral standardized target names, and want build machinery to run exactly one of them,\npropagating any errors. make(1) will exit 2 if a target does not exist, but an existing\ntarget may also exit 2 due to some other failure. Makefiles cannot be reliably parsed to find\ntargets by anything less Turing-complete than make, and make itself does not provide a way to\nenumerate the targets in a Makefile. It may not even be possible to enumerate the targets in\na Makefile without executing part of it. (Proof of this is left as an exercise for the\nreader.)\n\nThis program avoids the problems described above, by attempting to call each specified target\nin turn, until it observes make actually doing something for one of them.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "-c cmd\nThis can be used to specify the make command to run. Default is \"make\".\n",
                "subsections": []
            },
            "EXIT STATUS": {
                "content": "The exit status is 0 if at least one target existed and was successfully run, and nonzero\notherwise.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Joey Hess <joey@kitenet.net>\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Same as GNU make.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "make(1)\n\n\n\nperl v5.18.2                                 2014-05-13                MAKE-FIRST-EXISTING-TARGET(1)",
                "subsections": []
            }
        }
    }
}