Revert "make: let src/Makefile set *dir vars properly"
Subsystems (2)
PATCH 1/1 Revert "make: let src/Makefile set *dir vars properly"
This reverts commit 9236f53a8ffe96cc2430f7131bbcba5756b97bc2.
"make install DESTDIR=..." specifies a root directory where files are installed. For example, includedir=/usr/include DESTDIR=/a should install header files into /a/usr/include.
Commit 9236f53a8ffe removed the includedir=, etc arguments on the make command-line in ./Makefile, leaving only prefix=$(DESTDIR)$(prefix). It claimed "prefix suffice for setting *dir variables in src/Makefile" but this is incorrect. "make install DESTDIR=..." now has no effect and files are not installed with a DESTDIR prefix.
The GNU make manual 9.5 Overriding Variables says:
all ordinary assignments of the same variable in the makefile are ignored; we say they have been overridden by the command line argument.
This explains why it was necessary to set includedir=, etc on the make command-line in ./Makefile. We need to override these variables with DESTDIR from the command-line so they are not clobbered in src/Makefile when config-host.mak is included.
--- Makefile | 3 +++ 1 file changed, 3 insertions(+)
Makefile +3 -0
@@ -45,6 +45,9 @@ endif install: $(NAME).pc @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) \ + includedir=$(DESTDIR)$(includedir) \ + libdir=$(DESTDIR)$(libdir) \ + libdevdir=$(DESTDIR)$(libdevdir) \ relativelibdir=$(relativelibdir) $(INSTALL) -D -m 644 $(NAME).pc $(DESTDIR)$(libdevdir)/pkgconfig/$(NAME).pc $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man2
Signature · 1 line
2.35.1
Jens Axboe
maintainerQuoted 14 lines · Stefan Hajnoczi
This reverts commit
9236f53a8ffe96cc2430f7131bbcba5756b97bc2."make install DESTDIR=..." specifies a root directory where files are installed. For example, includedir=/usr/include DESTDIR=/a should install header files into /a/usr/include.
Commit
9236f53a8fferemoved the includedir=, etc arguments on the make command-line in ./Makefile, leaving only prefix=$(DESTDIR)$(prefix). It claimed "prefix suffice for setting *dir variables in src/Makefile" but this is incorrect. "make install DESTDIR=..." now has no effect and files are not installed with a DESTDIR prefix.The GNU make manual 9.5 Overriding Variables says:
Quoted 8 lines
all ordinary assignments of the same variable in the makefile are ignored; we say they have been overridden by the command line argument.
This explains why it was necessary to set includedir=, etc on the make command-line in ./Makefile. We need to override these variables with DESTDIR from the command-line so they are not clobbered in src/Makefile when config-host.mak is included.
I think this should have gone to [email protected], the patch had me confused for a second.
Signature · 1 line
Jens Axboe
Quoted 19 lines · Jens Axboe
Quoted 18 lines · Stefan Hajnoczi
This reverts commit
9236f53a8ffe96cc2430f7131bbcba5756b97bc2."make install DESTDIR=..." specifies a root directory where files are installed. For example, includedir=/usr/include DESTDIR=/a should install header files into /a/usr/include.
Commit
9236f53a8fferemoved the includedir=, etc arguments on the make command-line in ./Makefile, leaving only prefix=$(DESTDIR)$(prefix). It claimed "prefix suffice for setting *dir variables in src/Makefile" but this is incorrect. "make install DESTDIR=..." now has no effect and files are not installed with a DESTDIR prefix.The GNU make manual 9.5 Overriding Variables says:
all ordinary assignments of the same variable in the makefile are ignored; we say they have been overridden by the command line argument.
Quoted 7 lines
Quoted 4 lines
This explains why it was necessary to set includedir=, etc on the make command-line in ./Makefile. We need to override these variables with DESTDIR from the command-line so they are not clobbered in src/Makefile when config-host.mak is included.
I think this should have gone to [email protected], the patch had me confused for a second.
Sorry about that. I have updated my configuration to send patches to the correct list.
Stefan
Quoted 6 lines · Stefan Hajnoczi
This reverts commit
9236f53a8ffe96cc2430f7131bbcba5756b97bc2."make install DESTDIR=..." specifies a root directory where files are installed. For example, includedir=/usr/include DESTDIR=/a should install header files into /a/usr/include.
Quoted 7 lines
Commit
9236f53a8fferemoved the includedir=, etc arguments on the make command-line in ./Makefile, leaving only prefix=$(DESTDIR)$(prefix). It claimed "prefix suffice for setting *dir variables in src/Makefile" but this is incorrect. "make install DESTDIR=..." now has no effect and files are not installed with a DESTDIR prefix.[...]
Applied, thanks!
[1/1] Revert "make: let src/Makefile set *dir vars properly"
commit: 415c62fca6b8014bf9b03517c4d6e0e2e7ad02a9
Best regards,
Signature · 1 line
Jens Axboe