We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

question about autoconf

lwinkenb
lwinkenb asked
on
Medium Priority
267 Views
Last Modified: 2010-04-01
I've written a package that uses autoconf, and automake.  I am having trouble figuring out how to set my log file for the program though.  I want the program to use the --localstatedir as the log directory.

How do I make the command
%make install
create the localstatedir, and how can I make my program use that for the log directory?  
Comment
Watch Question

AxterSenior Software Engineer
CERTIFIED EXPERT

Commented:
Modify your make file so that the link command includes the "--localstatedir" option.
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks, that works for accessing the localstatedir from my program.  Now do I make sure the directory is created when the user runs 'make install'?
not sure if it's the best solution, but a local install hook should do.

in your Makefile.am:

install-data-local:
     $(mkinstalldirs) $(localstatedir)

Author

Commented:
Thanks for your help
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.