From fac543387f047155d06fd064b4de029bcb6f5590 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 4 Jun 2008 16:14:23 -0700 Subject: [PATCH] Fix "make dist" in datapath/linux-2.4 when --with-l24 not used. This makes the linux-2.4 Makefile.main.in structure much more similar to the linux-2.6 Makefile.main.in. --- datapath/linux-2.4/Makefile.main.in | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/datapath/linux-2.4/Makefile.main.in b/datapath/linux-2.4/Makefile.main.in index 4b542592..08848c5c 100644 --- a/datapath/linux-2.4/Makefile.main.in +++ b/datapath/linux-2.4/Makefile.main.in @@ -12,18 +12,26 @@ include $(srcdir)/../Modules.mk include $(srcdir)/Modules.mk include @HW_TABLES@ -all: default default: $(all_links) $(foreach m,$(all_modules), \ $(foreach s,$($(m)_sources), \ $(eval $(notdir $(s)): ; ln -s $(srcdir)/../$(s) .))) -# Verify Kernel Sources +distclean: clean +distdir: clean +install: +all: default +check: all +clean: + rm -f *.o *_mod.o .*.o.flags + for d in $(all_links); do if test -h $$d; then rm $$d; fi; done + +ifneq (,$(KSRC)) + ifneq ($(shell grep -c 'PATCHLEVEL = 4' $(KSRC)/Makefile),1) $(error Linux kernel source in $(KSRC) not 2.4) endif -ifneq (,$(KSRC)) ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC)) KOBJ := /lib/modules/$(shell uname -r)/build else @@ -58,13 +66,4 @@ endif all: $(MAKE) -C $(KSRC) $(ARCH_OVERRIDE) CROSS_COMPILE=$(CROSS_COMPILE) SUBDIRS=$(PWD) modules -distclean: clean -distdir: clean -clean: - rm -f *.o *_mod.o .*.o.flags - for d in $(all_links); do if test -h $$d; then rm $$d; fi; done - -check: all -install: - endif # (,$(KSRC)) -- 2.30.2