Makefile nicht ganz korrekt?

  • Hallo Klaus,

    zur Zeit versuche ich den vdr mittels Cross-Compiler zu bauen. Klappt auch soweit seit ein paar Minuten.

    Dabei ist mir aufgefallen dass im Makefile eine Inkonsistens ist:

    Code
    install-pc: vdr.pc    if [ -n "$(PCDIR)" ] ; then\
           mkdir -p $(DESTDIR)$(PCDIR) ;\
           cp vdr.pc $(DESTDIR)$(PCDIR) ;\
           fi

    Sollte das nicht so sein:

    Code
    ... if [ -n "$(DESTDIR)$(PCDIR)" ] ....
    ....

    Oder habe ich was übersehen?

    Liebe Grüße, Dieter :)

    Click to see my VDRs

    VDR5: Fujitsu Futro S740, 2TB SSD Kingston, Sat->IP von Octopus Net 8, Ubuntu 24.04, yavdr-ansible, IRMP, TV: LG 42LM670S.

    VDR1: (abgeschaltet) Asrock B75-Pro3, G1610, 4TB WD, Sat->IP von Octopus Net 8, Gainward GT630 Rev2, NVidia 470.103.01, Ubuntu 20.04 AMD64 Server, Kernel 5.4.0-107-generic, VDR 2.6.1, yavdr-ansible, Softhddevice, rc_core mit RC6+RC5, CIR-Homebrew-RS485 mit 8m Kabel, 10m HDMI, TV: LG 42LM670S

  • -n prüft doch nur ob die Variable nicht leer ist. Soll das so sein, oder soll geprüft werden, ob das Verzeichnis existiert? Dann müsste es if [ ! -d ... lauten

    Kanallogos: Picon.cz2VDR | Picons2VDR | MP-Logos
    Backupskripte:
    MV_Backup (RSync) | MV_BorgBackup (Borg)

    Skin: Skin FlatPlus  VDR-Add_MSGT

    "Es gibt keinen Grund, warum irgendjemand einen Computer in seinem Haus wollen würde."
    [Ken Olson], Präsident der Digital Equipment Corp., 1977

    VDR01 - yaVDR 0.7 (VDR 2.7.3)

    VDR 2.7.3; Gehäuse: Antec Fusion V2 Black & iMon LCD; Atric IR-Einschalter Rev. 4; Board: Intel DH77EB, Core i5-3550, GTX 1050 Ti, 8 GB RAM; DVB: 1x Digital Devices CineS2 Quad V6.5

    >Systeminfo.txt< [VDR-User #1540]

  • Zumindest für die bash gilt, aber das auch so in Makefiles gilt..

    Operator Tests Whether

    -z -n unary comparison, string is/is-not null

    -e File exists

    -s File is not zero size

    -f File is a regular file

    -d File is a directory

    -h File is a symbolic link

    -L File is a symbolic link

    -b File is a block device

    -c File is a character device

    -p File is a pipe

    -S File is a socket

    -t File is associated with a terminal

    -r File has read permission

    -w File has write permission

    -x File has execute permission

    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler
    Display Spoiler


    to spoil
    verderben
    beschädigen
    plündern
    behindern
    berauben
    vereiteln
    rauben
    zerstören [fig.] [verderben, verunstalten]
    vergällen
    verhageln [fig.]

  • Ist wohl nicht ganz so einfach. Shell-Befehle müssen wohl in einer Zeile stehen:

    https://stackoverflow.com/questions/2076…side-a-makefile

    Kanallogos: Picon.cz2VDR | Picons2VDR | MP-Logos
    Backupskripte:
    MV_Backup (RSync) | MV_BorgBackup (Borg)

    Skin: Skin FlatPlus  VDR-Add_MSGT

    "Es gibt keinen Grund, warum irgendjemand einen Computer in seinem Haus wollen würde."
    [Ken Olson], Präsident der Digital Equipment Corp., 1977

    VDR01 - yaVDR 0.7 (VDR 2.7.3)

    VDR 2.7.3; Gehäuse: Antec Fusion V2 Black & iMon LCD; Atric IR-Einschalter Rev. 4; Board: Intel DH77EB, Core i5-3550, GTX 1050 Ti, 8 GB RAM; DVB: 1x Digital Devices CineS2 Quad V6.5

    >Systeminfo.txt< [VDR-User #1540]

  • Megavolt hat recht. Sorry für die Verunsicherung.

    Code
    -n STRING    The length of STRING is greater than zero.

    Liebe Grüße, Dieter :)

    Click to see my VDRs

    VDR5: Fujitsu Futro S740, 2TB SSD Kingston, Sat->IP von Octopus Net 8, Ubuntu 24.04, yavdr-ansible, IRMP, TV: LG 42LM670S.

    VDR1: (abgeschaltet) Asrock B75-Pro3, G1610, 4TB WD, Sat->IP von Octopus Net 8, Gainward GT630 Rev2, NVidia 470.103.01, Ubuntu 20.04 AMD64 Server, Kernel 5.4.0-107-generic, VDR 2.6.1, yavdr-ansible, Softhddevice, rc_core mit RC6+RC5, CIR-Homebrew-RS485 mit 8m Kabel, 10m HDMI, TV: LG 42LM670S

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!