Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a script that installs a software. The script have answers prepared in advance in order to feed checkinstall with them. checkinstall prompts differently when the source has already been configured/make or not.
How can I tell if configure / make / make install was executed in the source directory?

share|improve this question
    
Are you using plain make or autotools? –  Benjamin Bannier Jul 20 '11 at 15:14
    
I'm executing ./configure, make and checkinstall. But checkinstall is essentially make install. –  Dor Jul 20 '11 at 15:30

1 Answer 1

up vote 1 down vote accepted

I am not sure I understand how your setup looks like, but when using autotools (like you seem to do) files are created from autotools template files like configure.in and Makefile.am.

The different steps then produce a number of files in the build directory you could check for.

  • ./configure creates e.g. Makefile and config.status
  • make creates e.g files below .deps and .libs
  • make install doesn't leave any traces in the build directory, but copies files to their install locations.

To check if make install was run you could supplement the default install rules, e.g. add to your Makefile.am

install-data-local:
        @touch .installed

and then check for .installed.

Since when using autotools there won't be no Makefile before running ./configure you would have to handle this case differently.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.