Skip to contentSkip to conversation

stubdom: allow building with read-only sources

PATCH Applied Jan Beulich 3 participants 5 messages Nov 10, 2010 – Nov 19, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 stubdom: allow building with read-only sources

stubdom/Makefile +2 -1
@@ -155,8 +175,9 @@ cross-libpci: $(LIBPCI_STAMPFILE)
 $(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(ZLIB_STAMPFILE)
 	( cd $< && \
 	  cp ../libpci.config.h lib/config.h && \
+	  chmod u+w lib/config.h && \
 	  echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \
-	  cp ../libpci.config.mak lib/config.mk && \
+	  ln -sf ../../libpci.config.mak lib/config.mk && \
 	  $(CROSS_MAKE) CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I$(realpath $(MINI_OS)/include)" lib/libpci.a && \
 	  $(INSTALL_DATA) lib/libpci.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ && \
 	  $(INSTALL_DIR) $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include/pci && \
#1 lore raw

stubdom/Makefile cross-libpci: $(LIBPCI_STAMPFILE) · line 180

Quoted 10 lines
stubdom/Makefile +2 -1
@@ -155,8 +175,9 @@ cross-libpci: $(LIBPCI_STAMPFILE)
  $(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) $(ZLIB_STAMPFILE)
        ( cd $< && \
          cp ../libpci.config.h lib/config.h && \
+         chmod u+w lib/config.h && \
          echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \
-         cp ../libpci.config.mak lib/config.mk && \
+         ln -sf ../../libpci.config.mak lib/config.mk && \

Should the above line be

+ ln -sf ../libpci.config.mak lib/config.mk && \

instead? It seems an extra ../ was added and based just on the patch I can't tell why.

Patrick

#2 lore raw
Quoted 13 lines

Review cross-libpci: $(LIBPCI_STAMPFILE) · line 175

Quoted 5 lines
Quoted 1 line · Patrick Colp

--- a/stubdom/Makefile
+++ b/stubdom/Makefile

(quoted diff) +0 -0
@@ -155,8 +175,9 @@ cross-libpci: $(LIBPCI_STAMPFILE)
 $(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) 

$(ZLIB_STAMPFILE)

stubdom/Makefile cross-libpci: $(LIBPCI_STAMPFILE) · line 180

Quoted 6 lines
stubdom/Makefile +2 -1
       ( cd $< && \
         cp ../libpci.config.h lib/config.h && \
+         chmod u+w lib/config.h && \
         echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \
-         cp ../libpci.config.mak lib/config.mk && \
+         ln -sf ../../libpci.config.mak lib/config.mk && \
Quoted 6 lines

Should the above line be

+ ln -sf ../libpci.config.mak lib/config.mk && \

instead? It seems an extra ../ was added and based just on the patch I can't tell why.

No - the difference is between referencing the real file (cp) and creating a relative (to the target's location) symlink.

Jan

#3 lore raw
Quoted 15 lines · Jan Beulich
Quoted 15 lines

Review cross-libpci: $(LIBPCI_STAMPFILE) · line 175

Quoted 5 lines
Quoted 1 line · Patrick Colp

 --- a/stubdom/Makefile
+++ b/stubdom/Makefile

(quoted diff) +0 -0
@@ -155,8 +175,9 @@ cross-libpci: $(LIBPCI_STAMPFILE)
  $(LIBPCI_STAMPFILE): pciutils-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE)

$(ZLIB_STAMPFILE)

stubdom/Makefile cross-libpci: $(LIBPCI_STAMPFILE) · line 180

Quoted 6 lines
stubdom/Makefile +2 -1
        ( cd $< && \
          cp ../libpci.config.h lib/config.h && \
+         chmod u+w lib/config.h && \
          echo '#define PCILIB_VERSION "$(LIBPCI_VERSION)"' >> lib/config.h && \
-         cp ../libpci.config.mak lib/config.mk && \
+         ln -sf ../../libpci.config.mak lib/config.mk && \

Should the above line be

Quoted 7 lines
Quoted 4 lines

 +         ln -sf ../libpci.config.mak lib/config.mk && \

instead? It seems an extra ../ was added and based just on the patch I can't tell why.

No - the difference is between referencing the real file (cp) and creating a relative (to the target's location) symlink.

Ah right, of course :)

Patrick