AdaCore / AdaCore/gnatstudio

Makefile may destroy gnat_switches.py

Open Beginner friendly
#201 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ada
Stars
531
Forks
65
PR merge metrics
No merged PRs in 30d

Description

If the user guide is not present in the gnat directory, Makefile line 64 will generate an empty file if python command is not available or a plain text file containing if python is working:

gnat/building_executable_programs_with_gnat.rst not found

By the way, I think the path to Python should be fixed like this:

diff --git a/Makefile.in b/Makefile.in
index d0dc2e54dc..1ff59338cb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -5,7 +5,7 @@ RMDIR           = rm -rf
 STRIP           = strip
 AWK             = @AWK@
 PERL            = perl
-PYTHON          = python
+PYTHON          = @PYTHON@
 INSTALL         = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA    = @INSTALL_DATA@
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Makefile.in around line 64 and inspect how the missing gnat/building_executable_programs_with_gnat.rst file is handled and how PYTHON is defined. Reproduce the build with and without the user guide and with Python unavailable, then verify that gnat_switches.py is not emptied or replaced by the diagnostic text and that the configured Python path is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.