New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add simplest development build process to HACKING #1690
base: master
Are you sure you want to change the base?
Conversation
New developers not familiar with open source tools seem to struggle to build Geany simply, add a section near the top of hacking with the simple "get you started" process.
Note: I don't have docutils on this machine, and as I'm writing an Asciidoc implementation my ReSt is probably dodgy. So needs checking |
This might make more sense as a wiki article rather than an official recommendation. It has a couple things that aren't such good ideas like in-tree builds, using |
Nobody reads the wiki unless directed to, it has turned out to essentially be a waste of server space, but it was worth trying.
Agree that there are good reasons that experienced developers don't want in-tree builds, but they work and Geany should not be one of those arrogant projects where you need to understand all the details of the tooling before you are allowed to touch the code. Coding in C with obsolete tools is already enough of a backwater that few want to do it, so we should show how to make it easy or stop complaining about lack of contributors. This is a simple build with minimal steps, not a perfect one, and not intended to detail use of the tools.
Well, its for a first build post git clone, so it has to be
The very first thing it says is create a new directory and put the source in there, maybe it needs emphasising, clearly you missed it 😁 |
I don't know about that, it's frequently used/updated and indexed by Google.
IMO, this kind of documentation (for hackers) should set them up with a good foundation for actually hacking on Geany, not just how to make a one-off build, that is something more likely to be useful to regular users who need to build from source for whatever reason.
As above, if the instructions are to set the user up for how to properly hack on Geany, they will be reconfiguring fairly often, at least each time changes to the build system are pulled-in. Using autogen.sh also doesn't allow for out-of-tree builds, which is what we should be promoting if they actually want to get setup for doing real development.
I didn't miss it, but I was really confused on first read. IMO, it's better to put everything under a separate working directory for Geany hackage, and separate out source from build from install, etc. |
@codebrainz well, propose alternative text. If the recipe is short and simple then certainly setting people on the right path is good, but if it makes life harder for a first timer, then they will be a no-timer. |
IMO, it would be better as more verbatim text explaining what each command is doing and why, rather than some magic incantation people blindly poke into the terminal, but I'm not sure HACKING is the appropriate place for that (hence the suggestion for a wiki page). Without more verbatim explanations, I would personally recommend something more like this: export GEANY_DEV=$HOME/geany-dev
# one-time setup
mkdir -p $GEANY_DEV/build $GEANY_DEV/prefix
cd $GEANY_DEV
git clone https://github.com/geany/geany.git source
cd source
NOCONFIGURE=1 ./autogen.sh
# configuring the build and when updating from Git
cd $GEANY_DEV/build
../source/configure --prefix=$GEANY_DEV/prefix
# each rebuild/install/test
make install
# running with a local config directory
$GEANY_DEV/prefix/bin/geany -c $GEANY_DEV/config Which results in a much more friendly directory structure like:
|
Seems a good start, bung 'er in a PR. Since its all in a new directory |
This is a rather long tutorial-style section, but it seems to fit nicely towards the start of the HACKING file.
I added a longer section to the HACKING file, explaining stuff in more detail. Feel free to revert/revise/rebase/etc. Tested locally each command and the restructured text rendering looks OK. |
HACKING
Outdated
|
||
$ make install | ||
|
||
In fact, the `make install` rule will necessary run the complete build, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*necessarily
HACKING
Outdated
|
||
This usually takes a few minutes, depending on the speed of your | ||
system. This step is where you'll get all of your compilation errors | ||
so if you've change the source code, take heed of the warning/error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*changed
HACKING
Outdated
If you have multiple CPUs/cores you can pass the `-j` option to `make` | ||
to have it spin up the specified number of concurrent processes where | ||
possible to complete the compilation and linking stages in less time. | ||
Geany's build system is incremental, so after you hack on the code and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*is also incremental
HACKING
Outdated
possible to complete the compilation and linking stages in less time. | ||
Geany's build system is incremental, so after you hack on the code and | ||
want to rebuild, you can run `make` again and only the needed files | ||
will be built, which makes it much faster than the initial build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*will be re-built
HACKING
Outdated
|
||
$ git checkout master | ||
|
||
Whenever you've made changes to the source in some branch and want to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*sources
HACKING
Outdated
want to rebuild, you can run `make` again and only the needed files | ||
will be built, which makes it much faster than the initial build. | ||
|
||
Once Geany is built, we want to install it into the provided `--prefix` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*into the directory specified for the --prefix
option on the configure
script above
I stumbled back upon this looking for something else, should it be merged? |
IMHO, no, its no longer the simplest, which was the point of my original, its now TL;DR, but I don't care either way. |
The changes certainly no longer reflect the title of the PR, but it still seems like useful information. |
New developers not familiar with open source tools seem to struggle to build Geany simply, add a section near the top of hacking with the simple "get you started" process.