r391 - branches/vim-tiny/debian

Stefano Zacchiroli zack at costa.debian.org
Tue Nov 1 17:51:31 UTC 2005


Author: zack
Date: 2005-11-01 17:51:30 +0000 (Tue, 01 Nov 2005)
New Revision: 391

Modified:
   branches/vim-tiny/debian/rules
Log:
populate CFLAGS with -DFEAT_xxx instead of hacking feature.h to add extra feature to vim-tiny


Modified: branches/vim-tiny/debian/rules
===================================================================
--- branches/vim-tiny/debian/rules	2005-11-01 16:33:09 UTC (rev 390)
+++ branches/vim-tiny/debian/rules	2005-11-01 17:51:30 UTC (rev 391)
@@ -34,6 +34,9 @@
 TINYFLAGS+=--disable-gpm
 TINYFLAGS+=--disable-nls
 
+# add -DFEAT_* from tiny-features.txt
+TINYCFLAGS:=$(patsubst %,-D%,$(shell grep ^FEAT_ debian/tiny-features.txt | cut -f 1))
+
 OPTFLAGS+=--enable-gpm
 OPTFLAGS+=--enable-cscope
 OPTFLAGS+=--with-features=big
@@ -117,7 +120,7 @@
 CFLAGS_vim-basic=$(CFLAGS)
 CFGFLAGS_vim-basic=$(CFGFLAGS) $(OPTFLAGS) --without-x --enable-gui=no
 
-CFLAGS_vim-tiny=$(CFLAGS)
+CFLAGS_vim-tiny=$(CFLAGS) $(TINYCFLAGS)
 CFGFLAGS_vim-tiny=$(CFGFLAGS) $(TINYFLAGS)
 
 CFLAGS_vim-perl=$(CFLAGS)
@@ -203,7 +206,7 @@
 	for x in install postinst postrm prerm ; do	\
 	  rm -f debian/$*.$$x ;\
 	done
-	rm -f debian/lintian/$* debian/tiny-features.h
+	rm -f debian/lintian/$*
 
 build: extract
 build: build-stamp
@@ -214,40 +217,20 @@
 #	  -c "helptags $(SRCDIR)/runtime/doc" -c quit
 	touch $@
 
-.PHONY: debian/tiny-features.h
-debian/tiny-features.h:
-	@echo "*** DEBIAN *** adding to feature.h extra features for vim-tiny"
-	> debian/tiny-features.h # generate debian-specific features header
-	for feat in `grep ^FEAT_ debian/tiny-features.txt | cut -f 1` ; do \
-		echo "#define $$feat" >> debian/tiny-features.h ; \
-	done
-	# include it from feature.h if needed
-	if tail -1 $(VIMCUR)/src/feature.h | grep "debian/tiny-features.h" > /dev/null; then \
-		true ; \
-	else \
-		cp $(VIMCUR)/src/feature.h{,.orig} ; \
-		echo "#include \"../../debian/tiny-features.h\"" >> $(VIMCUR)/src/feature.h ; \
-	fi
-
-# patch feature.h to add extra vim-tiny features, backup to feature.h.orig
-configure-stamp-vim-tiny: debian/tiny-features.h
-
 configure-stamp-%:
 	dh_testdir
-	@echo "*** DEBIAN *** BUILDING VIM VARIANT $*"
+	@echo "*** DEBIAN *** CONFIGURING VIM VARIANT $*"
 	$(MAKE) -C $(SRCDIR) clean
-	# restore original feature.h if needed
-	if -f $(VIMCUR)/src/feature.h.orig; then \
-		mv $(VIMCUR)/src/feature.h{.orig,}; \
-	fi
 	cd $(SRCDIR) \
 		&& make distclean \
 		&& CFLAGS="$(CFLAGS_$(*))" ./configure $(CFGFLAGS_$(*))
 	touch $@
 
+build-stamp-%: CURCFLAGS=$(CFLAGS_$*)
 build-stamp-%: configure-stamp-%
 	dh_testdir
-	$(MAKE) -C $(SRCDIR)
+	@echo "*** DEBIAN *** BUILDING VIM VARIANT $*"
+	$(MAKE) -C $(SRCDIR) CFLAGS="$(CURCFLAGS)"
 	mv $(SRCDIR)/src/vim $(SRCDIR)/src/$(subst -,.,$*)
 	touch $@
 




More information about the pkg-vim-maintainers mailing list