summaryrefslogtreecommitdiff
path: root/devel/understand_c/Makefile
diff options
context:
space:
mode:
authorMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-03-09 23:08:58 +0000
committerMario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>2001-03-09 23:08:58 +0000
commit54e5a54aecafad7c7eb2c6063cf334c416f41f7b (patch)
treeff18fec3ac47aee6c14e6219dc90e02805668449 /devel/understand_c/Makefile
parentImport of new port skeleton: mail/xmailwatcher. (diff)
New port:
Understand can parse a C/C++ project helping reverse engineer it [begin snip from the www site] Understand parses any sized C or C++ project to help you reverse engineer, document and understand it and thus maintain it better. It supports K&R C, ANSI C, or C++ source code. Projects can contain mixed C/C++ code as well. The parser is efficient, fast, and can handle very large projects. Very little is needed to get started - just aim it at your source tree. Optionally (and for more parsing accuracy) add any externally defined macro definitions and include paths. All of this is done from the GUI - you should be able to do an initial analysis of your project in a few minutes. Understand for C++ quickly documents Class inheritance hierarchies (Base Class and Derived Classes), Call and CallBy Trees, Include and Include By Trees, as well as where and how everything in your source code is used (cross reference). Understand for C++ creates detailed automatic documentation about your source code in HTML and text reports Using the PERL and C API you can write your own documentation generators. [end snip from the www site] You need a limited time period license to run the product in evaluation mode. One can be obtained in the www site. A permanent license can be purchased there too. - Instalation issues: This port has a hardcoded directory structure which is required to run it. Therefore, some measures are necessary to install it under FreeBSD following handbook rules' 1) All files but binaries are installed according to hier(7) 2) A fake structure is created under ${PREFIX}/lib/understand_c to please the program and soft links are made there to the correct locations under hier(7) 3) The binaries are installed under ${PREFIX}/lib/understand_c/bin and a wrapper is installed under ${PREFIX}/bin pointing to the fake structure 4) Since a license is required to run the program, warnings are issued when either it is installed or a package is added 5) Since the legal status is still being debated with the developers, it will be marked as RESTRICTED for the time being and LEGAL will be updated accordingly
Diffstat (limited to 'devel/understand_c/Makefile')
-rw-r--r--devel/understand_c/Makefile117
1 files changed, 117 insertions, 0 deletions
diff --git a/devel/understand_c/Makefile b/devel/understand_c/Makefile
new file mode 100644
index 000000000000..74eb9a68175e
--- /dev/null
+++ b/devel/understand_c/Makefile
@@ -0,0 +1,117 @@
+# New ports collection makefile for: understand code browser for c/c++
+# Date created: 01 Mar 2001
+# Whom: Mario Sergio Fujikawa Ferreira <liouxFreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= understand_c
+PORTVERSION= 14b103
+CATEGORIES= devel linux
+MASTER_SITES= http://www.scitools.com/ftp/pub/download/understand_c/latest/
+DISTNAME= und_c-${PORTVERSION}-linux
+
+MAINTAINER= liouxFreeBSD.org
+
+ONLY_FOR_ARCHS= i386
+USE_LINUX= yes
+NO_WRKSUBDIR= yes
+NO_BUILD= yes
+
+RESTRICTED= Unsure about the license conditions on redistribution
+
+PREFIX_LINUX?= ${LINUXBASE}
+STRIP= ${LINUXBASE}/usr/bin/strip
+FMT?= /usr/bin/fmt
+
+CONF_DIRS= compilers configs fonts license
+CONF_FILES= compilers/aix.cfg compilers/alpha.cfg \
+ compilers/borlandc.cfg compilers/hpux.cfg \
+ compilers/linux.cfg compilers/msvc.cfg \
+ compilers/msvc16.cfg compilers/sgi.cfg \
+ compilers/solaris.cfg compilers/sunos.cfg \
+ configs/c.cfg fonts/cetus.ttf
+DOCS_DIRS= understand_c/wwhgifs understand_c/images \
+ understand_c understand_api/wwhgifs \
+ understand_api
+BIN_FILES= almd almhostid almstatus almtest \
+ repc understand_c undc
+LIB_FILES= libudb_api.a libudb_api.so
+
+pre-fetch:
+ @${ECHO_MSG} "===> You can select a linux base other than the default (${LINUXBASE})"
+ @${ECHO_MSG} "===> Just set PREFIX_LINUX=path_desired if you need AND know what you are doing"
+ @${ECHO_MSG} "===> Don't set this unless you have to. The default is usually a good idea"
+
+do-patch:
+ @${SED} 's!%%PREFIX%%!${PREFIX}/lib/understand_c/bin/pc-linux_elf!' \
+ ${FILESDIR}/wrapper.sh > ${WRKDIR}/wrapper.sh
+
+.include <bsd.port.pre.mk>
+
+PLIST_SUB= PREFIX_LINUX=${PREFIX_LINUX} \
+ LINUXBASE="${LINUXBASE}" \
+ ECHO="${ECHO}" FMT="${FMT}" \
+ MKDIR="${MKDIR}" LN="${LN} -sf" RM="${RM} -f"
+
+# Create hidden structure, the program is hardcoded.
+# Therefore, we will install it according to hier
+# but will create a symlink structure under PREFIX/lib/understand_c
+# to keep the binary happy. The exception are binaries which
+# will be done vice-versa.
+do-install:
+ @${MKDIR} ${PREFIX}/lib/understand_c
+# Configuration install
+.for dir in ${CONF_DIRS}
+ @${MKDIR} ${PREFIX}/share/understand_c/${dir}
+.endfor
+.for file in ${CONF_FILES}
+ @${INSTALL_DATA} ${WRKSRC}/conf/understand/${file} \
+ ${PREFIX}/share/understand_c/${file}
+.endfor
+ @${MKDIR} ${PREFIX}/lib/understand_c/conf
+ @${LN} -sf ${PREFIX}/share/understand_c \
+ ${PREFIX}/lib/understand_c/conf/understand
+ @${LN} -sf ${PREFIX}/share/understand_c/license \
+ ${PREFIX}/lib/understand_c/conf
+# Documentation installation
+.ifndef (NOPORTDOCS)
+.for dir in ${DOCS_DIRS}
+ @${MKDIR} ${PREFIX}/share/doc/understand_c/html/${dir}
+ @for file in ${WRKSRC}/doc/manuals/html/${dir}/* ; \
+ do \
+ if [ -f $${file} ]; \
+ then \
+ ${INSTALL_DATA} $${file} \
+ ${PREFIX}/share/doc/understand_c/html/${dir} ; \
+ fi ; \
+ done
+.endfor
+ @${MKDIR} ${PREFIX}/lib/understand_c/doc/manuals
+ @${LN} -sf ${PREFIX}/share/doc/understand_c/html \
+ ${PREFIX}/lib/understand_c/doc/manuals/html
+.endif /* NOPORTDOCS */
+# Binary installation
+ @${MKDIR} ${PREFIX}/lib/understand_c/bin/pc-linux_elf
+ @${INSTALL_SCRIPT} ${WRKDIR}/wrapper.sh ${PREFIX}/bin/understand_c
+.for file in ${BIN_FILES}
+ @${INSTALL_SCRIPT} ${WRKSRC}/bin/pc-linux_elf/${file} \
+ ${PREFIX}/lib/understand_c/bin/pc-linux_elf
+ @${STRIP} ${PREFIX}/lib/understand_c/bin/pc-linux_elf/${file}
+ @if [ ! -f ${PREFIX}/bin/${file} ]; \
+ then \
+ ${LN} -sf understand_c ${PREFIX}/bin/${file} ; \
+ fi
+.endfor
+# Library installation
+.for file in ${LIB_FILES}
+ @${INSTALL_DATA} ${WRKSRC}/bin/pc-linux_elf/${file} \
+ ${PREFIX_LINUX}/usr/lib
+.endfor
+ @${LINUXBASE}/sbin/ldconfig
+
+post-install:
+# Advertise the PKGMESSAGE
+ @${SED} 's!/usr/local!${PREFIX}!' ${PKGMESSAGE} | ${FMT}
+
+.include <bsd.port.post.mk>