-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Move away from committing an autogenerated script #13
Comments
Hi! Thanks for your report.
The program that generates the build script is quite a big project (its main function is not to generate build scripts, it is to actually compile code (multithreaded, tracking dependencies and file changes, scanning for necessary libraries to link to etc...)). It is definitely not meant for the general public. If I were ever to release it, it would not be as a part of signalbackup-tools, but as a separate project. But that is for a distant future: I have been using this tool for over ten years and I have a long list of changes planned for the program to make it better, faster more robust and make the generated scripts a lot nicer to read and faster as well, but unfortunately my time is limited and when I do have a moment, other issues and projects are more important right now.
Is there any particular reason to not want the autogenerated script in the project? I fully admit it's not very readable, but it's just a harmless little extra for anyone not willing to write the compilation command by hand, it's not actually necessary to use it. Would it help if I typed out the script manually whenever the source changes? |
Hi @bepaald. The main reason it'd be good to have the tooling that generated the build script committed is that it becomes possible for others to easily modify the build process, and submit patches to you to improve the build. At the moment, if I were to need to changes the flags passed to the compiler, then I have to edit tens (hundreds?) of lines that repeat those flags, and the resulting patch would be useless to you, as if you accepted it then you would no longer be able to use the aforementioned tooling. Since such patches couldn't be integrated by you, other people have to keep rebasing their set of build patches on top of any changes you make and resolving whatever conflicts are involved. This is all based on the assumption that you would like others to use and work on this signal backup tool -- if this isn't the case then I apologise for making that assumption. |
buildscript_new.txt
Having said all that: buildscript_new.txt Renamed with .txt extension because github won't have any other way) |
Also the buildscript has some bashisms in it that prevent it from running with dash (which is the default /bin/sh on debian and some other distros). Here's the output of the check-bashisms tool:
But better would be to replace this script with a Makefile or something |
Also it would be nice to be able to run "make clean" to be sure all the old .o's etc are gone, have common flags at the top where you could change them in one place, not have to rebuild things that are already built with no dependency changes, etc. |
Also, the default compiler section could use an $EXTRAOPTIONS in the final linking line so that it's possible to just set |
Ok, I've fixed those for now. The script should work with dash now, thanks!
Agreed, but I have neither the time, nor the skill to write and maintain a Makefile. I do have a newer version of a buildscript that has some advantages. It looks a lot cleaner and more comprehensible, it has the flags at the top for easy editing (though the flags can also be set at the command line without editing the file itself), it uses all available processor cores and it only recompiles files when the object is out of date. One disadvantage though: it needs bash (or compatible, certainly not dash). Maybe you would like to test it and give an opinion?
Yes, that is indeed a good idea, I might get to work on that soon. But, in the meantime - as I've said before - if you want to fiddle with the compiler flags, the buildscript is basically not for you (the current one at least, maybe the new one will be). It was originally just provided because I realized a relatively large group of Windows users might want to try the program, who have no idea what 'compiling' is or how to do it (at that time, Windows builds were not possible, so compiling and running under Linux was the only option). If you are capable of typing |
Hi, this tool is really useful! Would it be possible for you to commit the tooling that generated the build script?
The text was updated successfully, but these errors were encountered: