Skip to content
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

[Feature request] move generated while make files into another directory #1360

Open
mdziczkowski opened this issue Apr 13, 2021 · 9 comments

Comments

@mdziczkowski
Copy link
Contributor

I would like to request the feature that all files generated within the make, should be put into a separate folder outside the src. Additionally, the files, should be into sub-folders, basing on their extension. For example: *.o -> libs, binaries (netmush, etc.) -> bin

@HarryCordewener
Copy link
Contributor

While I agree this is a good standard to have, what is the benefit to this feature request to the end user that will make it worth the time of a developer to do this work?

@mdziczkowski
Copy link
Contributor Author

mdziczkowski commented Apr 14, 2021

The make commands causes that all of the files (sources and results) are put together inside of the src folder, causing that it get a bit "messy" and the amount of the files makes that it's hard to find anything (for example: binaries) without doing a search.

There were cases that sometimes (from time to time, not regulatory) some binaries weren't generated (I had discovered that after the search and browsing the src folder.

Adding the proposed as an standard would keep the sources separated from the "results" (with is an advantage while the development and bug fixing), plus it would help to discover if all files have become correctly generated

@ray73864
Copy link
Contributor

More than welcome to do a PR for it.

As for the 'discover if all files have become correctly generated', when you run 'make', it'll spit out an error if it couldn't compile a file and then stop compiling from that point onwards.

@mdziczkowski
Copy link
Contributor Author

Not exactly. There were a cases that the make got finished correctly (without any serious errors), but the binaries (like for example "netmush") hasn't become generated. It's possible that could be a temporary problem with got fixed

@ray73864
Copy link
Contributor

If the netmush binary in the src directory didn't get created, then the 'make' would have failed on the linking step right at the very end, and again would have said why it failed.

@mdziczkowski
Copy link
Contributor Author

@ray73864 I try to do some attempt's to recreate it. If I success then I'll make a separate report about it. Let's hope it was only an temporary problem with got fixed ;-)

@talvo
Copy link
Member

talvo commented Apr 15, 2021

I don't see any harm in this, but I also don't care enough to do it myself :) If someone submitted a patch and no one else can see any reason it could cause issues I'd support.

@mdziczkowski
Copy link
Contributor Author

mdziczkowski commented Apr 15, 2021

I had done some research and had discovered that the netmush get's generated (in oposite to ssl_slave and the info_something ones), but I haven't discovered yet, why does the make install does not work correctly.

I have done at the start the ./configure --prefix=somedir before make. The most files (except the ones mentioned above in the branches) were generated correctly. After doing the make install, they don't get installed to given by the configure place (I tryed even make install DESTDIR=somedir and it didn't worked too).

I think that it would be a good idea to make that the generated executables were put (instead of beeing linked) into the game directory, that the game is ready to run after finishing the buid process.

It's possible that the linking may (but don't have too) cause that after moving there can become broken links (unfortunatelly, the Linux developers haven't thought about coding it, to make that the path of the link source would be generated dynamically, that when moving the source file to nother location wouldn't break the links)

@mdziczkowski
Copy link
Contributor Author

I had found (thanks RHostMush ;-) ] a code with could solve the discovery of (for example) database file names, with can become automatically updated in the config file. Given code is only the base to work at.

INPUT_DB=${DATA_DIR}/grep "^input" ${GAMENAME}.cnf | awk {printf("%s",substr($0,index($0,$2)))}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants