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 am reading a nice article about upgrading php on mac os x mountain lion.

At the Install part of the document the author says that the user must execute a multiple line configure command. What is the easiest way to do it, using mac os terminal? Thank you.

PS : I have executed yesterday the configure command without the parameters. Can this action cause any problems with the re-execution of configure command (with parameters this time)?

share|improve this question
    
Re-execution of configure wont cause any major changes unless you perform make && sudo make install. You may collect commands/multiple-line commands required & save it to Shell Script and execute it! –  Mayur Pipaliya Oct 11 '12 at 14:06

1 Answer 1

up vote 2 down vote accepted

In Mac OS X the default shell (Terminal.app calls) is Bash. In this case, you can use the \ character to continue a line if needed. This is shown in the tutorial you link to. Other assistance may be gained from reading about Mac OSX Shell Scripting Basics.

./configure  \
--prefix=/usr  \
--mandir=/usr/share/man  \
--infodir=/usr/share/info  \
--sysconfdir=/private/etc  \

etc

Typically you only need to run the configure command once with your options, then make for subsequent builds. You could put the commands into a script to run, of which you can then just run that one file to execute your commands:

makeProg.sh

#!/bin/sh

cd /prog/dir

./configure  \
 --prefix=/usr  \
 --mandir=/usr/share/man  \
 --infodir=/usr/share/info  \
 --sysconfdir=/private/etc  \

make
share|improve this answer
    
The default shell is bash, not tcsh. –  slhck Oct 11 '12 at 14:44
    
@slhck Thanks! I don't have a Mac, so I' can't verify the shell. However, according to what I read from Apple support it states the The default shell (or command-line interface) used in Mac OS X 10.0 through 10.2.8 is tcsh ..., therefore my assumption. –  PenguinCoder Oct 11 '12 at 14:46
    
Well, through 10.2.8 – which was released in 2002. The very same support article mentions bash, which is still correct until now. –  slhck Oct 11 '12 at 15:20

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.