> On Wednesday, September 27, 2017 9:30 AM, grischka <address@hidden> wrote:
> May I suggest something: Why don't you guys combine your knowledge> and
personal preferences and apply it to our standard Makefile instead> of adding each
your own scripts?
I don't disagree that it would be nice to have one place which maintains the work of
"create the win32 distributions (32/64)", and preferably it can run on any
system/OS, and be reproducible.
I was attempting to improve the standard makefile some time ago with roughly
that in mind, and specifically the cross builds. You can see my list of commits
(haven't pushed new ones for over a year) here:
https://github.com/avih/tinycc/commits/drafts
However, as hard as I tried, I could not keep my patches up to date with your
(grishka) ever changing-everything commits once in a while, especially those at
Makefile and configure.
And since I didn't consider my patches production ready to push, and I couldn't
maintain and rebase them, I dropped this work, and concentrated my efforts on
my reproducible build script.
I suspect (though for sure cannot know) that win32/Makefile is not integrated to the main
Makefile for similar reasons. After all, why would one need win32/Makefile if the main
one would "just work" for this need?
I did manage to push to mob or promote some changes, such as supporting out of
tree builds, for which I'm grateful.
As I see it, both, Christian's win32/Makefile (labeled "for cygwin")
as well as Avi's suggested reproducible builds script really are very
similar:
Indeed they are. They use the same approach and with the same goal. The main
differences I could identify off hand would be:
- win32/Makefile requires [g]make. my script needs only a shell and a compiler.
- win32/Makefile runs only on cygwin (and confirmed msys2 too), but not on *nix
systems (tested ubuntu), mine runs everywhere I tested - which is a lot.- My
script calculates and prints a signature to confirm reproducibility.- My script
makes an explicit effort to not require features which are not available
everywhere, such as realpath, symlinks, and few more, and instead implements
good enough variants as posix shell functions.
- My script only puts new files at the output dir and doesn't leave traces at
the main dir[s]. It also creates a temp work dir inside the output dir and
deletes it once done. As you can tell, I'm a big fan of out-of-tree builds...
My goal was to allow building the same binary everywhere (even osx or bsd) and
with the same tool (a single script), with the minimal supported setup being
busybox on windows and tcc itself as a bootstrap CC .
Therefore I find most of the diffs meaningful.
If you agree with this goal, then I cannot see this happen with the main
configure and Makefile. I did also try to use a win32 make.exe within busybox
and do the normal procedure. I made some progress, but there are a lot of
roadblocks and a lot of missing features, and eventually I dropped it and took
the script approach.
I also think it won't be fair to limit the tools which the main configure &&
make use just to allow building with a minimal setup.
What do you guys think?
I'm willing to help with such effort, but It will only be usable with a full
blown development environment, which not everyone has.
I think the reproducible shell script would still have value on such case, for
the little people :), and for its simplicity and relatively bullet proof
implementation (famous last words ;) ).