LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using install command (https://www.linuxquestions.org/questions/linux-newbie-8/using-install-command-330046/)

denalitastic 06-03-2005 04:50 PM

using install command
 
Hello i have fedora core 3 im new to linux heres my problem.

#
# For machines that don't have lint, remove $(LINTLIB) from the
# "all" target.
#
# On BSD machines, LINTOPT should be '-C', RANLIB should be 'ranlib'
#
# On System V machines, LINTOPT should be '-o $(NOTHING)',
# RANLIB should be ':'
#
SHELL = /bin/sh
RANLIB = :
NOTHING =
LINTOPT = -o $(NOTHING)

OPT = -O -g
DEBUG =
CFLAGS = $(OPT) $(DEBUG)
LIBRARY = pdb

LIBARCH = lib$(LIBRARY).a
LINTLIB = llib-l$(LIBRARY).ln
OBJS = pdb_read.o pdb_sprntf.o pdb_sscanf.o pdb_write.o pdbrun.o ms.o
SRCS = pdb_read.c pdb_sprntf.c pdb_sscanf.c pdb_write.c pdbrun.c ms.c

all: $(LIBARCH) $(LINTLIB)

install: $(LIBARCH)
install -f /usr/local/lib $(LIBARCH)

$(LIBARCH): $(OBJS)
@echo "Loading $(LIBARCH) ... "
@ar cru $(LIBARCH) $(OBJS)
@$(RANLIB) $(LIBARCH)

@echo "done"

This is part of a Makefile, i ran make install but i get a problem
This is jjust snippet of the whole code to this but when i run this i get a problem with the line line install -f /usr/local/lib $(LIBARCH) heres what it looks like from the terminal.

make install
install -f /usr/local/lib libpdb.a
install: invalid option -- f
Try `install --help' for more information.
make: *** [install] Error 1

The force command seems not to work under Linux, is it just a unix command? Anyways I dont see what i can do, if i remove the -f it gives me other error msgs. Is there another way to write that line using a different method or something. Im mucho lost. Thanks for any help.

trickykid 06-03-2005 06:22 PM

What are the other errors and what exactly are you trying to install? Little details get poor responses.. ;)

denalitastic 06-04-2005 02:43 PM

Ok the program im trying to install is called dms. Its used for computing the surface area of molecules(if you care). Im trying to install one of its libraries and it aint working. Anyways ill list everything for ya.

From the website I got it from.
You need to have the C-language PDB-reading library from the
UCSF Computer Graphics Laboratory installed. You can get it from:
ftp://ftp.cgl.ucsf.edu/pub/libpdb.shar


So that is the shar file i got libpdb.shar. I then used sh < libpdb.shar
to extract. This is what the Makefile looks like.

#
# For machines that don't have lint, remove $(LINTLIB) from the
# "all" target.
#
# On BSD machines, LINTOPT should be '-C', RANLIB should be 'ranlib'
#
# On System V machines, LINTOPT should be '-o $(NOTHING)',
# RANLIB should be ':'
#
SHELL = /bin/sh
RANLIB = :
NOTHING =
LINTOPT = -o $(NOTHING)

OPT = -O -g
DEBUG =
CFLAGS = $(OPT) $(DEBUG)
LIBRARY = pdb

LIBARCH = lib$(LIBRARY).a
LINTLIB = llib-l$(LIBRARY).ln
OBJS = pdb_read.o pdb_sprntf.o pdb_sscanf.o pdb_write.o pdbrun.o ms.o
SRCS = pdb_read.c pdb_sprntf.c pdb_sscanf.c pdb_write.c pdbrun.c ms.c

all: $(LIBARCH) $(LINTLIB)

install: $(LIBARCH)
install -F /usr/local/lib $(LIBARCH)

$(LIBARCH): $(OBJS)
@echo "Loading $(LIBARCH) ... "
@ar cru $(LIBARCH) $(OBJS)
@$(RANLIB) $(LIBARCH)
@echo "done"

$(LINTLIB): $(SRCS) $(HDRS)
@echo "Creating $(LINTLIB) ... "
@lint $(LINTOPT)$(LIBRARY) $(SRCS)
@echo "done"

clean:; @rm -f $(OBJS)

spotless:; @rm -f $(OBJS) $(LIBARCH) $(LINTLIB)

lint: $(SRCS)
lint -u $(SRCS)

tags: $(HDRS) $(SRCS); @ctags -w $(HDRS) $(SRCS)


After i extract the libpdb.shar file I then wanted to install. The problem i seem to be having has to do with the line that
says ............ install -F /usr/local/lib $(LIBARCH)

This is the error i get


[root@tmp000feaebd7d5 dms]# make install
install -f /usr/local/lib libpdb.a
install: invalid option -- F
Try `install --help' for more information.
make: *** [install] Error 1

Now i read a little online and it seems the -f option or force copy does not exist in linux it is just in unix, is that correct?
All i want is a replacement for that line or a way to install using that command with a different option. It seems that install is mainly used to update files that already exist. My problem is that I am installing for the first time where something like the -f option for install would be needed. Im sure there is some exceedingly simple solution, I just cant figure out what it is.


Thank you in advance


All times are GMT -5. The time now is 05:34 PM.