Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure why you can’t just have your build script create the build directory?
 help



Because you might not have a build script?

Then how is anything ending up in the build directory?

Then why do you need a build directory?

qemu: mkdir build; cd build; ../configure, some projects are like that

Why can’t the configure script do this?

Because the standard for configure scripts says that the current directory at invocation is the build directory and the location of the configure script is the source directory. You are expected to be able to have multiple build directories if you want them. If you have written your configure script correctly, than in-tree builds (srcdir == builddir) also work, but most people don't want that anyway.

You can. But this makes intent clear. If you clone a git repo and see build/ with only a gitkeep, you are safe to bet your life savings on that being the compiled assets dir.

Usually, you can. But occasionally you get mildly defective tools that require some directory to exist, even though it's empty. It's easier to add a gitkeep than fix them.

This used to happen a lot. But I don't think that many modern builders require existing directory these days.

Your point is valid though. It would be much preferable to include build/ in your root .gitignore so that the directory is never tracked.


There may be other directories. I think it's useful to be able to see the entire directory structure of a repo when you check it out, and not just after running some scripts.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: