javamakefilewindows-subsystem-for-linuxjavac

Issue with javac makefile


I have an issue with the makefile I am doing using java. So:

./bin/fp2/poo/utilidades/TitularInterfaz.class: 
                          ./bin/fp2/poo/utilidades/CodigoPostalInterfaz.class   \
              ./bin/fp2/poo/utilidades/CorreoElectronicoInterfaz.class   \
              ./bin/fp2/poo/utilidades/Excepciones/DniIncorrectoExcepcion.class   \
              ./bin/fp2/poo/utilidades/DniInterfaz.class \
              ./src/fp2/poo/utilidades/TitularInterfaz.java \
/bin/javac $(OPCIONES) ./src/fp2/poo/utilidades/TitularInterfaz.java

It's the part of the makefile which is giving me an error which is the following one: make: *** No hay ninguna regla para construir el objetivo '-encoding', necesario para 'bin/fp2/poo/utilidades/TitularInterfaz.class'. Alto. traduction: "make: *** There is no rule to build the objective '-encoding', needed to 'bin/fp2/poo/utilidade/TitularInterface.class'. Stop."

Knowing that OPCIONES traduces into: -encoding ISO-8859-1 -g -Xlint -classpath ./bin/ -d ./bin/

So, explaining the whole program has to do more or less the same thing that a bank does, with a bank class (banco.class) and gestor.class (which is the person that can do x movements to the bank accounts.

From what I understand, as a rookie, the error looks like MATE terminal does not take the /bin/javac, nor whereas I would put javac or /usr/bin/javac. Now, I do not understand at all why It does not work on this interface but it does in all the others.

For those that wonder, I have to use a makefile, I would do it on Eclipse, and I have seen that the code is right (I made it on Eclipse and then made the makefile).

I have tried to change the code and remake the makefile as all, but It just does not work there, and knowing that makefile "reads" down to upwards, thus It will not compile any longer.

I have also tried to change destination but It does not work either.


Solution

  • To make clear my comment above, this:

    ./bin/fp2/poo/utilidades/TitularInterfaz.class: \
                    ./bin/fp2/poo/utilidades/CodigoPostalInterfaz.class   \
                    ./bin/fp2/poo/utilidades/CorreoElectronicoInterfaz.class   \
                    ./bin/fp2/poo/utilidades/Excepciones/DniIncorrectoExcepcion.class   \
                    ./bin/fp2/poo/utilidades/DniInterfaz.class \
                    ./src/fp2/poo/utilidades/TitularInterfaz.java \
            /bin/javac $(OPCIONES) ./src/fp2/poo/utilidades/TitularInterfaz.java
    

    Should instead be this (note the removal of the last backslash):

    ./bin/fp2/poo/utilidades/TitularInterfaz.class: \
                    ./bin/fp2/poo/utilidades/CodigoPostalInterfaz.class   \
                    ./bin/fp2/poo/utilidades/CorreoElectronicoInterfaz.class   \
                    ./bin/fp2/poo/utilidades/Excepciones/DniIncorrectoExcepcion.class   \
                    ./bin/fp2/poo/utilidades/DniInterfaz.class \
                    ./src/fp2/poo/utilidades/TitularInterfaz.java
            /bin/javac $(OPCIONES) ./src/fp2/poo/utilidades/TitularInterfaz.java