MODINCL = $(TOPDIR)/include/linux/modules
# The -w option (enable warnings) for genksyms will return here in 2.1
$(MODINCL)/%.ver: %.c
- $(CC) $(CFLAGS) -E -D__GENKSYMS__ $<\
- $(GENKSYMS) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) > $@.tmp
+ targ=`basename $@|sed 's/\./_/g'|tr a-z A-Z` ;\
+ $(CC) $(CFLAGS) -E -D__GENKSYMS__ $<\
+ | (echo "#ifndef _$$targ" ;\
+ echo "#define _$$targ" ;\
+ $(GENKSYMS) -k $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) ;\
+ echo "#endif /* _$$targ */" ;\
+ ) > $@.tmp ;\
mv $@.tmp $@
The shame of it is that genksym will do this for us if it weren't for the fact
that we're piped in as stdin.
Off to 2.2-land!
-- Bryan W. Headley Home: bheadley@interaccess.com 211 East Pineview Drive Office: bryan.headley@abnamro.com Round Lake Park, IL 60073 Phone: 847 740-1446