Author: vedge
Date: 2008-04-10 04:35:38 -0300 (Thu, 10 Apr 2008)
New Revision: 705

Modified:
   trunk/build.lib.mk
   trunk/build.prog.mk
   trunk/mkconfigure.pl
Log:
ctags


Modified: trunk/build.lib.mk
===================================================================
--- trunk/build.lib.mk  2008-04-02 11:44:46 UTC (rev 704)
+++ trunk/build.lib.mk  2008-04-10 07:35:38 UTC (rev 705)
@@ -72,6 +72,10 @@
 INCLDIR?=
 CLEANFILES?=
 
+CTAGS?=
+CTAGSFLAGS?=
+DPADD+=lib-tags
+
 all: all-subdir lib${LIB}.a lib${LIB}.la
 install: install-lib install-subdir
 deinstall: deinstall-lib deinstall-subdir
@@ -332,7 +336,7 @@
 
 cleandir-lib:
        rm -f ${LIBTOOL} ${LIBTOOL_COOKIE} ${LTCONFIG_LOG} config.log
-       rm -f .depend
+       rm -f .depend tags
        if [ -e "./config/prefix.h" ]; then rm -fr ./config; fi
        if [ -e "Makefile.config" ]; then echo -n >Makefile.config; fi
 
@@ -439,11 +443,23 @@
 
 none:
 
+lib-tags:
+       [EMAIL PROTECTED] [ "${CTAGS}" != "" ]; then \
+           if [ "${SRC}" != "" ]; then \
+               (cd ${SRC}; \
+                echo "${CTAGS} ${CTAGSFLAGS} -R"; \
+                ${CTAGS} ${CTAGSFLAGS} -R); \
+           else \
+               echo "${CTAGS} ${CTAGSFLAGS} -R"; \
+               ${CTAGS} ${CTAGSFLAGS} -R; \
+           fi; \
+       fi
+
 ${LTCONFIG} ${LTCONFIG_GUESS} ${LTCONFIG_SUB} ${LTMAIN_SH}:
 
 .PHONY: install deinstall includes clean cleandir regress depend
 .PHONY: install-lib deinstall-lib clean-lib cleandir-lib
-.PHONY: _lib_objs _lib_shobjs none
+.PHONY: _lib_objs _lib_shobjs lib-tags none
 
 include ${TOP}/mk/build.common.mk
 include ${TOP}/mk/build.dep.mk

Modified: trunk/build.prog.mk
===================================================================
--- trunk/build.prog.mk 2008-04-02 11:44:46 UTC (rev 704)
+++ trunk/build.prog.mk 2008-04-10 07:35:38 UTC (rev 705)
@@ -59,6 +59,10 @@
 CONF_OVERWRITE?=No
 CLEANFILES?=
 
+CTAGS?=
+CTAGSFLAGS?=
+DPADD+=prog-tags
+
 all: all-subdir ${PROG}
 install: install-prog install-subdir
 deinstall: deinstall-prog deinstall-subdir
@@ -282,7 +286,7 @@
        fi
 
 cleandir-prog:
-       rm -f core *.core config.log .depend
+       rm -f core *.core config.log .depend tags
        if [ -e "./config/prefix.h" ]; then rm -fr ./config; fi
        if [ -e "Makefile.config" ]; then echo -n >Makefile.config; fi
 
@@ -378,9 +382,21 @@
 
 none:
 
+prog-tags:
+       [EMAIL PROTECTED] [ "${CTAGS}" != "" ]; then \
+           if [ "${SRC}" != "" ]; then \
+               (cd ${SRC}; \
+                echo "${CTAGS} ${CTAGSFLAGS} -R"; \
+                ${CTAGS} ${CTAGSFLAGS} -R); \
+           else \
+               echo "${CTAGS} ${CTAGSFLAGS} -R"; \
+               ${CTAGS} ${CTAGSFLAGS} -R; \
+           fi; \
+       fi
+
 .PHONY: install deinstall clean cleandir regress depend
 .PHONY: install-prog deinstall-prog clean-prog cleandir-prog
-.PHONY: _prog_objs _prog_pobjs none
+.PHONY: _prog_objs _prog_pobjs prog-tags none
 
 include ${TOP}/mk/build.common.mk
 include ${TOP}/mk/build.dep.mk

Modified: trunk/mkconfigure.pl
===================================================================
--- trunk/mkconfigure.pl        2008-04-02 11:44:46 UTC (rev 704)
+++ trunk/mkconfigure.pl        2008-04-10 07:35:38 UTC (rev 705)
@@ -220,7 +220,7 @@
 EOF
 
        print << 'EOF';
-# Copyright (c) 2001-2007 Hypertriton, Inc. <http://hypertriton.com/>
+# Copyright (c) 2001-2008 Hypertriton, Inc. <http://hypertriton.com/>
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -497,6 +497,21 @@
 echo "ENABLE_NLS=${ENABLE_NLS}" >> Makefile.config
 echo "HAVE_GETTEXT=${HAVE_GETTEXT}" >> Makefile.config
 
+CTAGS=""
+for path in `echo $PATH | sed 's/:/ /g'`; do
+       if [ -x "${path}/ectags" ]; then
+               CTAGS="${path}/ectags"
+       fi
+done
+if [ "${CTAGS}" = "" ]; then
+       for path in `echo $PATH | sed 's/:/ /g'`; do
+               if [ -x "${path}/ctags" ]; then
+                       CTAGS="${path}/ctags"
+               fi
+       done
+fi
+echo "CTAGS=${CTAGS}" >> Makefile.config
+
 LIBTOOL_BUNDLED="yes"
 LIBTOOL=\${TOP}/mk/libtool/libtool
 echo "LIBTOOL=${LIBTOOL}" >> Makefile.config

_______________________________________________
BSDBuild-Commits mailing list
[email protected]
http://mail231.csoft.net/mailman/listinfo/bsdbuild-commits

Reply via email to