| Summary: | better 'install' make targets | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Adam Jackson <ajax> |
| Component: | Other | Assignee: | mesa-dev |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | high | ||
| Version: | git | ||
| Hardware: | x86 (IA32) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: |
patch
Patch |
||
|
Description
Adam Jackson
2005-01-24 10:42:01 UTC
Created attachment 5520 [details] [review] patch Replace bin/installmesa with various install targets. The directory to use for the DRI drivers is now also specified in the Makefiles, so it can be easily overridden. Forgot to mention it: Defining PREFIX in the top level Makefile, too really sucks, but we cannot include configs/current from it, I think :( Ideas to fix this are appreciated. Haven't looked at it real closely, but the default prefix isn't consistent within the patch. Some places it's /usr, others it's /usr/local -- should always be the latter. Yes. Defining PREFIX in two places isn't acceptable anyway... the 2nd definition in the top level Makefile needs to go. Created attachment 5548 [details] [review] Patch I don't know why I thought it was necessary to define PREFIX in the top level Makefile. It's fixed in the new patch which works just fine. So, any comments on this? I'm willing to work more on this, but I think it's ready for inclusion :) Sorry, I kind of forgot about this and haven't had time lately to scan the bug database. I'll try to review this in the next week or so. I've applied your patch with a number of changes. 1. Define INSTALL variable in configs/default so that it may be overridden. 2. Use two simplified install paths: INSTALL_DIR and DRI_DRIVERS_INSTALL_DIR. 3. Fixed glut's install target. It's kind of ugly that we need the COPY_LIBS command. Apparently, it's just to make up for the fact that 'install' doesn't install symlinks as symlinks. I'm tempted to write a Mesa/bin/install shell script that'll wrap 'install' and handle symlinks correctly, then get rid of COPY_LIBS. src/glx/x11/Makefile now says: EXTRA_DEFINES = ... -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_INSTALL_DIR)\" This makes packaging more difficult than it needs to be IMO. To create packages, I'd like to set DRI_DRIVER_INSTALL_DIR to /usr/lib/dri, set DESTDIR to some temporary directory, so the files get copied there, then I'd tar up DESTDIR. With the current approach this isn't possible. I'd have to set DRI_DRIVER_INSTALL_DIR to /usr/lib/dri for the compile stage, then set it to /some/temp/directory/usr/lib/dri for the installation stage. Having DESTDIR solves this problem in an elegant way, and I think it's a common technique to build packages. It doesn't make the Makefile look much more complicated either, most people will just leave DESTDIR undefined and things would just work. OK, I didn't know you needed to separate driver installation and search like that. How about a 3rd variable, DRI_DRIVER_SEARCH_DIR, defaulting to /usr/X11R6/lib/modules/dri ? Then, EXTRA_DEFINES = ... -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" This way, the concepts of installation and run-time searching are kept distinct. I found the concatenation of paths in your patch confusing. Too bad you don't like the DESTDIR approach :) but you are right, having DRI_DRIVER_SEARCH_DIR would solve that problem, too. The toplevel Makefile already uses DESTDIR as the parameter to pass to
installmesa for its prefix. It should probably use PREFIX instead and pass
$(DESTDIR)$(PREFIX), where DESTDIR=/tmp/mesa or similar and PREFIX=/usr.
Here's how Gentoo currently installs:
make \
DESTDIR=${D}/usr \
INCLUDE_DIR=${D}/usr/include \
LIB_DIR=${D}/usr/lib \
install
where D is some temporary directory, as Tilman said. It would be useful for the
DRI drivers to respect some similar setting.
Another problem already surfaced on the mesa3d-users list. On some systems libraries go into somepath/lib64/ (or lib32/) instead of somepath/lib/ I think those issues are all resolved now, so this could be closed. Seems to be OK now, closing. Mass version move, cvs -> git |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.