Arun Kumar
Arun Kumar

Reputation: 471

cp Command Giving Error in Make file

HI while executing the below make file code i'm getting an error saying that ,

Signing File 3E0022__.FPG
cp: missing destination file  ******Error during cp command 
Try `cp --help' for more information.****

this is my script:

    for fpga in $(LIST_A); do\
            link=1;\
            for disFpga in  $(LIST_B); do\
                    if [ "$$fpga" = "$$disFpga" ] ;then\
                            echo "Signing File $$fpga";\
                            cp $($(fpga)) $(PKG)/$(fpga);\ ===> * Error at this Point*              
                               link=0;\
                    fi;\
            done;\
                    if [ $$link -eq 1 ] ;then  echo "Linking Done for $$fpga  File";\
                     fi;\
    done;

kindly help me to resolve this issue

Thanks

Arun

Upvotes: 0

Views: 1534

Answers (2)

Beta
Beta

Reputation: 99144

You are getting Make variables mixed up with shell variables. This will do what I think you want:

cp $$fpga $(PKG)/$$fpga;\

Upvotes: 1

JeremyP
JeremyP

Reputation: 86671

I think $($(fpga)) is wrong. Should it be $(fpga)

Upvotes: 0

Related Questions