Эх сурвалжийг харах

Make: make TOPDIR actually work and get rid of unused CDIR

Signed-off-by: Richard Hughes <richard@hughsie.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones 1 жил өмнө
parent
commit
bd864bda4c

+ 1 - 1
Make.defaults

@@ -34,7 +34,7 @@
 #    SUCH DAMAGE.
 #    SUCH DAMAGE.
 #
 #
 
 
-TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
+TOPDIR ?= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
 
 
 #
 #
 # Variables below overridable from command-line:
 # Variables below overridable from command-line:

+ 1 - 3
apps/Makefile

@@ -37,12 +37,10 @@
 SRCDIR = .
 SRCDIR = .
 
 
 VPATH = $(SRCDIR)
 VPATH = $(SRCDIR)
+TOPDIR = $(SRCDIR)/..
 
 
 include $(SRCDIR)/../Make.defaults
 include $(SRCDIR)/../Make.defaults
 
 
-TOPDIR = $(SRCDIR)/..
-
-CDIR=$(TOPDIR)/..
 LINUX_HEADERS	= /usr/src/sys/build
 LINUX_HEADERS	= /usr/src/sys/build
 APPSDIR		= $(LIBDIR)/gnuefi/apps
 APPSDIR		= $(LIBDIR)/gnuefi/apps
 CPPFLAGS	+= -D__KERNEL__ -I$(LINUX_HEADERS)/include
 CPPFLAGS	+= -D__KERNEL__ -I$(LINUX_HEADERS)/include

+ 1 - 3
gnuefi/Makefile

@@ -37,12 +37,10 @@
 SRCDIR = .
 SRCDIR = .
 
 
 VPATH = $(SRCDIR)
 VPATH = $(SRCDIR)
+TOPDIR = $(SRCDIR)/..
 
 
 include $(SRCDIR)/../Make.defaults
 include $(SRCDIR)/../Make.defaults
 
 
-TOPDIR = $(SRCDIR)/..
-
-CDIR=$(TOPDIR)/..
 PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
 PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
 FILES	= reloc_$(ARCH)  
 FILES	= reloc_$(ARCH)  
 
 

+ 1 - 4
inc/Makefile

@@ -1,12 +1,9 @@
 SRCDIR = .
 SRCDIR = .
 
 
 VPATH = $(SRCDIR)
 VPATH = $(SRCDIR)
-
-include $(SRCDIR)/../Make.defaults
-
 TOPDIR = $(SRCDIR)/..
 TOPDIR = $(SRCDIR)/..
 
 
-CDIR=$(TOPDIR)/..
+include $(SRCDIR)/../Make.defaults
 
 
 all:
 all:
 
 

+ 1 - 3
lib/Makefile

@@ -37,12 +37,10 @@
 SRCDIR = .
 SRCDIR = .
 
 
 VPATH = $(SRCDIR)
 VPATH = $(SRCDIR)
+TOPDIR = $(SRCDIR)/..
 
 
 include $(SRCDIR)/../Make.defaults
 include $(SRCDIR)/../Make.defaults
 
 
-TOPDIR = $(SRCDIR)/..
-
-CDIR = $(TOPDIR)/..
 FILES = boxdraw smbios console crc data debug dpath \
 FILES = boxdraw smbios console crc data debug dpath \
         entry error event exit guid hand hw init lock \
         entry error event exit guid hand hw init lock \
         misc pause print sread str cmdline\
         misc pause print sread str cmdline\