[DRBD-cvs] drbd by phil; * Updates to Build system. * Updates to ...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Fri, 6 Feb 2004 09:50:19 +0100 (CET)
DRBD CVS committal
Author : phil
Module : drbd
Dir : drbd/drbd
Modified Files:
Makefile
Log Message:
* Updates to Build system.
* Updates to INSTALL - readme and SMGL fixes to documentation
by Lars
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/Makefile,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- Makefile 24 Jan 2004 10:43:16 -0000 1.27
+++ Makefile 6 Feb 2004 08:50:14 -0000 1.28
@@ -46,10 +46,8 @@
ifeq ($(PATCHLEVEL),2)
include $(SUBDIRS)/Rules-2.2.x.make
- # this rules file would extract the 2.2 variables
- # from the 2.4+ obj-[ynm] ones; but since the code
- # no longer compiles with 2.2.x: sorry!
- # $(error "won't compile with a 2.2.x kernel")
+ # this rules file extracts the 2.2 variables
+ # from the 2.4+ obj-[ynm] ones
else
include $(TOPDIR)/Rules.make
endif
@@ -58,16 +56,14 @@
echo $(KERNELRELEASE) > .kernelrelease
$(LD) -r -o $@ $(drbd-objs)
-
else
- ifneq ($(PATCHLEVEL),6)
- # we only compile for [-2.2,-] 2.4 and 2.6. sorry.
- $(error "won't compile with this kernel version")
- endif
+ # we only compile for 2.2 and 2.4. sorry.
+ $(error "won't compile with this kernel version ($(KERNELRELEASE))")
endif
else
# called from command line in current directory
PWD := $(shell pwd)
+
# to be overridden on command line:
PREFIX := /
ifeq ($(wildcard ../build-for-uml),../build-for-uml)
@@ -98,26 +94,30 @@
greeting:
@echo "" ;\
echo " Calling toplevel makefile of kernel source tree, which I believe is in" ;\
- echo " KDIR=$(KDIR)" ;\
- echo " NOTE: please ignore warnings regarding overriding of SUBDIRS" ;\
- echo ""
+ echo " KDIR=$(KDIR)"; echo ""
kbuild: greeting
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(ARCH_UM) modules
@echo -n "Memorizing module configuration ... "
- @{ echo "# drbd.o was compiled against this: " ; \
- sed 's/^/# kernelrelease: /' .kernelrelease ; \
- echo "# $(KDIR)/.config alias" ; \
- echo "# $$(readlink $(KDIR))/.config follows" ; \
- echo "" ; \
- cat $(KDIR)/.config ; } | gzip > .kernel.config.gz
+ @{ echo -e "#\n# drbd.o was compiled with" ; \
+ echo "# `gcc -v 2>&1 | tail -1`" ; \
+ echo "# against this kernelrelease:" ; \
+ sed 's/^/# /' .kernelrelease ; \
+ echo "# kernel .config from" ; \
+ echo -n "# $(KDIR)/.config" ; \
+ test -L "$(KDIR)" && echo " alias" && \
+ echo "# $$(readlink $(KDIR))/.config" || echo "" ; \
+ echo -e "# follows\n#\n" ; \
+ cat $(KDIR)/.config ; } | gzip > kernel.config.gz
@echo "done."
- # obsolete in 2.6 ...
dep: greeting
@echo "make dep ..."
- @$(MAKE) -s -C $(KDIR) SUBDIRS=$(PWD) $(ARCH_UM) dep
+ @$(MAKE) -s -C $(KDIR) SUBDIRS=$(PWD) $(ARCH_UM) dep || \
+ echo "I'll ignore this error, but this can cause inconsistencies!"
@echo "done."
+
+ kbuild: dep
clean:
rm -f *.[oas] *.ko .*.cmd .*.d .*.tmp *.mod.c .*.flags .depend .kernel*