automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Are there shell equivalents to PREFIX etc.?


From: Andy Falanga (afalanga)
Subject: Are there shell equivalents to PREFIX etc.?
Date: Mon, 28 Mar 2016 20:07:50 +0000

My question is, I hope, quite simple.  I have a case where I made some 
distribution, installation and uninstall hooks in my Makefile.am:

|EXTRA_DIST = setupenv.sh bootstrap tests dist-hook: rm -rf $$(find 
$(distdir)/tests -name \*.swp -o -name \*.pyc) install-exec-hook: mkdir 
-p $(prefix)/unit_tests/unittest2 for f in tests/*.py; do \ cp $$f 
$(prefix)/unit_tests; \ done for f in tests/unittest2/*.py; do \ cp $$f 
$(prefix)/unit_tests/unittest2; \ done uninstall-hook: rm -r 
$(prefix)/unit_tests |

Ordinarily, this works just fine.  However, when building the RPM for 
this software, the prefix is set to an alternative location in /opt.  I 
would have thought that the rules I've written would have worked with 
the RPM build system.  This isn't quite the case though.  When executing 
my install hook, the mkdir command fails because the common user doesn't 
have permissions to make directories in /opt/..... .

The RPM system, if you're not familiar, "localizes" the installation in 
that is makes the install process into to a faux location, usually 
~/rpmbuild/BUILDROOT.  So, in this case, this would be 
~/rpmbuild/BUILDROOT/opt/..... .  Is there a means of re-writing the 
rule that I have for installation/uninstall which will do as I expect in 
the RPM build?

Andy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]