Comments (2)
Any default Makefile
, using only make
default options, would likely fail at the same scenario, since it would generate the *.o
object files in the same directories as the source files.
Since this scenario is beyond default, I'm looking for some "industry standard practices" to support read-only source repositories with make
, if that ever exists.
In the specific case of the zstd
make
build script, we have some custom control over where the *.o
object files are generated, using the variable BUILD_DIR
.
However, it only controls the destination of *.o
object files, and there are many other files that can be generated, starting with the final binaries themselves, or their symlinks.
That's where the build script fails in your example.
These target binaries are still generated in their default directory (lib/
in this case), which are read-only.
A relatively common way to control the destination of generated binaries with Makefile
is to employ the variable DESTDIR
.
However, it still wouldn't work because DESTDIR
is for staged installs, meaning that while it controls the final destination of the binaries, there's nothing that states that no other intermediate storage shall ever be used for these binaries. Which is what happens : during the "build" stage, the binaries are generated in their default directories, and in the second "install" stage, they are transferred to their final destination. It mirrors the example provided in the GNU documentation.
Therefore, in order to be able to build from a read-only directory, this intermediate generation stage should be either skipped, or redirected.
That's a non-trivial change, because it's distributed among all targets instead of being concentrated in a single paragraph. Hence it comes with risks, and heavier maintenance.
So, before moving in a direction which would make the project more difficult to maintain, I would like to get an idea of "industry standard practices" if they exist, or consider if other solutions (such as copying the source tree into a writable location) would ultimately prove easier to live with.
from zstd.
The Makefile for the Linux kernel supports this
from zstd.
Related Issues (20)
- Modernize macros to use `do { } while (0)` instead of `{ }` HOT 9
- [question] Seek for insights on the suitable case for zstd dictionary compression HOT 5
- zstd not buildable with PAC/BTI becauseof `huf_decompress_amd64.S` HOT 4
- get a core dump on use ZSTD_compressCCtx (Unhandled exception access violation) HOT 4
- Adding a library to https://facebook.github.io/zstd/#other-languages HOT 1
- Allow files bigger than 2GiB for --patch-from option HOT 1
- Allow files bigger than 2GiB for --patch-from option HOT 2
- [Question] How to force single literal streams during compression HOT 1
- Export "selected" CMake target for zstd HOT 7
- [Question] Understanding of compression level with external sequence producer HOT 2
- zstd fails to process some filenames on Windows [we need a hero] HOT 3
- We need a ZStd JavaScript library HOT 1
- Compiler warnings present when integrated with Swift Package Manager
- will zstd get nvcomp acceleration or a gpu support like g-brotli? HOT 1
- How can I change the window size? HOT 1
- Increase minimum C standard from C89/C90 to C11 HOT 3
- New zstd 1.5.5 version is two times slower in compression speed than older 1.4.5 version HOT 12
- ZSTD with T option does not scale on multicore CPUs HOT 7
- Question about FSE Huffman literal part
- C++ Builder and mem.h ambiguity HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zstd.