Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-other / 2006-03

fpcmake question

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bob Richards

Hi:

I guess the easiest way to ask this is to show what doesn't work and how:

in my Makefile.fpc I have:

[install]
prefix=/usr/local
prefix=/home/virtual/site1/fst/usr/local
prefix=/home/virtual/site2/fst/usr/local
prefix=/home/virtual/site3/fst/usr/local
prefix=/home/virtual/site4/fst/usr/local
prefix=/home/virtual/site5/fst/usr/local
prefix=/home/virtual/site6/fst/usr/local
prefix=/home/virtual/site7/fst/usr/local
prefix=/home/virtual/site8/fst/usr/local
prefix=/home/virtual/site9/fst/usr/local

Reason? I need to install the same programs to several virtual servers on the same physical box.

The generated Makefile has these entries:

override INSTALL_PREFIX=/usr/local /home/virtual/site1/fst/usr/local /home/virtual/site2/fst/usr/local /home/virtual/site3/fst/usr/local /home/virtual/site4/fst/usr/local /home/virtual/site5/fst/usr/local /home/virtual/site6/fst/usr/local /home/virtual/site7/fst/usr/local /home/virtual/site8/fst/usr/local /home/virtual/site9/fst/usr/local

Looks reasonable :-(

A make install however barfs thus:

# make install
/usr/bin/install -m 755 -d /usr/local /home/virtual/site1/fst/usr/local /home/virtual/site2/fst/usr/local /home/virtual/site3/fst/usr/local /home/virtual/site4/fst/usr/local /home/virtual/site5/fst/usr/local /home/virtual/site6/fst/usr/local /home/virtual/site7/fst/usr/local /home/virtual/site8/fst/usr/local /home/virtual/site9/fst/usr/local/bin /usr/bin/install -c -m 755 togoogle fromgoogle /usr/local /home/virtual/site1/fst/usr/local /home/virtual/site2/fst/usr/local /home/virtual/site3/fst/usr/local /home/virtual/site4/fst/usr/local /home/virtual/site5/fst/usr/local /home/virtual/site6/fst/usr/local /home/virtual/site7/fst/usr/local /home/virtual/site8/fst/usr/local /home/virtual/site9/fst/usr/local/bin
/usr/bin/install: `/usr/local' is a directory
/usr/bin/install: `/home/virtual/site1/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site2/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site3/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site4/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site5/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site6/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site7/fst/usr/local' is a directory /usr/bin/install: `/home/virtual/site8/fst/usr/local' is a directory make: *** [fpc_install] Error 1

Only the last entry (site9) got installed, the rest failed. So, what is the correct way to install to multiple directories?? IE What should Makefile.fpc look like?

TIA
Bob

Peter Vreman
to Bob Richards
you wrote 21 lines
Hi: I guess the easiest way to ask this is to show what doesn't work and how: in my Makefile.fpc I have: [install] prefix=/usr/local prefix=/home/virtual/site1/fst/usr/local prefix=/home/virtual/site2/fst/usr/local prefix=/home/virtual/site3/fst/usr/local prefix=/home/virtual/site4/fst/usr/local prefix=/home/virtual/site5/fst/usr/local prefix=/home/virtual/site6/fst/usr/local prefix=/home/virtual/site7/fst/usr/local prefix=/home/virtual/site8/fst/usr/local prefix=/home/virtual/site9/fst/usr/local Only the last entry (site9) got installed, the rest failed. So, what is the correct way to install to multiple directories?? IE What should Makefile.fpc look like?

Use a shell script with a for loop and pass the values to the Makefile on the commandline with INSTALL_PREFIX=

Peter

Bob Richards
to Peter Vreman
Peter Vreman wrote
Use a shell script with a for loop and pass the values to the Makefile on the commandline with INSTALL_PREFIX=

Thanks for the reply:

I was afraid of that, but was looking for a more elegant solution :-(

I manage several servers, and run into this often. I was trying to set up a makefile with #IFDEF constructs to take care of all situations. I maintain all the software under CVS, so fixing/adding things is easy and clean EXCEPT for the install process.

Guess I will write a generic shell script, one which first determines the server's structure, and then recurses make appropriately.

Bob

PGP Encrypted E-Mail Preferred Public Key at: http://www.tamara-b.org/~bob/pubkey.asc .
Marco van de Voort
to Bob Richards

[ Charset ISO-8859-1 unsupported, converting... ]

Show quoted text 6 lines
Peter Vreman wrote: > Use a shell script with a for loop and pass the values to the Makefile > on the commandline with INSTALL_PREFIX= I was afraid of that, but was looking for a more elegant solution :-(

Another logical solution is to install once to tempdir, and copy 10 times.