Can we discover if DESTDIR is supported before running make?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
And the last post (at the time, from zariweb) got me thinking. I didn't want to clutter up the thread, so I thought I'd start another =)
Quote:
Checkinstall is great for building packages for software that don't honor the DESTDIR in make but I really prefer building them manually when I can.
This is a very good point, and in contemplating the automation of this a little further (something like downloading the slackware build script for a package, building and then installing, or using checkinstall if the package wasn't in the slack repository) I wondered if it was possible to know in advance which software *didn't* honor the DESTDIR in make / make install ?
Is it merely a case of that if the software is using relatively new automake tools and the `./configure && make && make install procedure` that DESTDIR is supported, or is there something else about the process that can be used to determine (from a source directory, ./configure'd if necessary, raw ideally) if a slackbuild script will work for that package?
I hope that's clear - sorry for the somewhat obscure query - feel free to point me at any links I may have missed that will answer this question (I wasn't sure where to look, to be honest, my understanding of the automake process is flakey at best).
If it's there, it will usually work as expected. There are a lot of packages that are stupid about some things and will still try to make changes to your live filesystem. I strongly recommend using tee to log the output of the make install, and then go over it to make sure the Makefile wasn't doing anything dim-witted amongst all the scrolling.
Building a good package always means not assuming everything installs cleanly, even though you find traces of DESTDIR in the configure or Makefile scripts. Always use a method to see if files are installed outside of your package target directory - I use installwatch because it writes a clean log, but even so, examining the output from the "make install" stage is equally important.
I would never rely on checkinstall to produce packages. Checkinstall will not catch all installed files in all circumstances. It does a good job in many cases however. Writing a SlackBuild script means you have complete control, but it requires some manual effort.
Thanks for all the responses. When a slackbuild is available, I generally use it in place of checkinstall. I've found checkinstall to be more than good enough for my lazy bones, was just wondering if there was any advance way of checking for DESTDIR support.
I have no desire to become any sort of package maintainer, I just like being able to uninstall things or grep /var/log/packages/ for things I have installed!
It looks to me as though the answer on the question is: "Sometimes." Which is what I expected. Many people implement destination directory on install in different ways and no automated procedure will catch them all, or be able to deal with the (potentially) infinite varieties of implementations.
So, many thanks to all who've taken the time to answer and think it over =)
- Piete.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.