Commit e2ad5042 authored by Naba Kumar's avatar Naba Kumar

Added files which I forgot previously.

	* scripts/*: Added files which I forgot previously.
parent ae33f230
anjuta_datadir = $(prefix)/@NO_PREFIX_PACKAGE_DATA_DIR@
anjuta_data_SCRIPTS = anjuta_import.sh
anjuta_data_DATA = anjuta_project.template
EXTRA_DIST = $(anjuta_data_SCRIPTS) $(anjuta_data_DATA)
#!/bin/bash
#
# Shell script to automatically create an Anjuta 1.x project file
# Copyright: Biswapesh Chattopadhyay (biswapesh_chatterjee@tcscal.co.in) 2001-2002
# This file can be freely copied for any purpose. There are NO guarantees.
#
TEMPLATE="$(dirname $0)/anjuta_project.template"
PROGRAM=anjuta
DIR=${1:-"."}
TMPFILE=/tmp/$PROGRAM.$$.tmp
if [ ! -s "${TEMPLATE}" ]; then
echo "Template file ${TEMPLATE} does not exist!" >&2
exit 1
fi
${PROGRAM} --version >${TMPFILE}
if [ $? -ne 0 ]; then
echo "Anjuta not found !" >&2
\rm -f ${TMPFILE}
exit 1
fi
PROGRAM_VERSION=`cat $TMPFILE | awk '{print $NF}' | sed 's/\.//g' | cut -c1-3`
if [ "${PROGRAM_VERSION}" -lt 19 ]; then
AN_INCLUDE_NAME="incude"
else
AN_INCLUDE_NAME="include"
fi
if [ "$DIR" != '.' ]; then
if [ ! -d "$DIR" ]; then
echo "Directory $1 does not exist !" >&2
\rm -f ${TMPFILE}
exit 1
fi
if ! \cd $1; then
echo "Unable to chdir to $1" >&2
\rm -f ${TMPFILE}
exit 1
fi
fi
if [ -f "configure.in" ]; then
package_line=$(grep AM_INIT_AUTOMAKE configure.in)
if [ ! -z "${package_line}" ]; then
AN_PROJECT_NAME=$(echo ${package_line} | awk -F'[(),]' '{print $2}')
AN_PROJECT_VERSION=$(echo ${package_line} | awk -F'[(),]' '{print $3}')
fi
fi
if [ -z "${AN_PROJECT_NAME}" ]; then
AN_PROJECT_NAME=$(pwd | awk -F'/' '{print $NF}' | sed 's/-[0-9][^-]*$//')
AN_PROJECT_VERSION=$(pwd | awk -F'/' '{print $NF}' | awk -F'-' '{if ((NF > 1) && ($NF ~ /^[0-9]/)) print $NF}')
fi
AN_PROJECT_NAME=$(echo ${AN_PROJECT_NAME} | sed 's/[ ]//g' | sed 's/[^0-9a-zA-Z_]/_/g')
AN_PROJECT_VERSION=$(echo ${AN_PROJECT_VERSION} | sed 's/[ ]//g')
if [ -z "${AN_PROJECT_NAME}" ]; then
echo "WARNING!! Unable to derive project name. Using default value.." >&2
AN_PROJECT_NAME="template"
fi
if [ -z "${AN_PROJECT_VERSION}" ]; then
echo "WARNING!! Unable to derive project version. Using default value.." >&2
AN_PROJECT_VERSION="0.99"
fi
PRJ_FILE="${AN_PROJECT_NAME}.prj"
if [ -f "${PRJ_FILE}" ]; then
if ! mv ${PRJ_FILE} ${PRJ_FILE}.$$; then
echo "Unable to backup existing project file! Exiting." >&2
\rm -f ${TMPFILE}
exit 1
fi
echo "WARNING!! Existing project file ${PRJ_FILE} backed up as ${PRJ_FILE}.$$" >&2
fi
AN_SOURCE_FILES=""
for file in `find . -name "*.c" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.cc" -o -name "*.C"`
do
AN_SOURCE_FILES="$AN_SOURCE_FILES `echo $file | cut -c3-`"
done
AN_HEADER_FILES=""
for file in `find . -name "*.h" -o -name "*.hpp" -o -name "*.H" -o -name "*.hh"`
do
AN_HEADER_FILES="$AN_HEADER_FILES `echo $file | cut -c3-`"
done
AN_PIXMAP_FILES=""
for file in `find . -name "*.xpm" -o -name "*.png" -o -name "*.gif" -o -name "*.jpg"`
do
AN_PIXMAP_FILES="$AN_PIXMAP_FILES `echo $file | cut -c3-`"
done
AN_DOC_FILES=""
for file in `find . -name "README" -o -name "INSTALL" -o -name "NEWS" -o -name "COPYING" -o -name "ChangeLog" \
-o -name "CREDITS" -o -name "AUTHORS" -o -name "TAHNKS" -o -name "TODO" -o -name "HACKING" \
-o -name "FUTURE" -o -name "BUGS" -o -name "*.sgml" -o -name "*.html"`
do
AN_DOC_FILES="$AN_DOC_FILES `echo $file | cut -c3-`"
done
AN_PO_FILES=""
if [ -d "po" ]; then
if \cd po; then
for file in `find . -name "*.po"`
do
AN_PO_FILES="$AN_PO_FILES `echo $file | cut -c3-`"
done
\cd ..
fi
fi
AN_BUILD_FILES=""
for file in `find . -name "Makefile.am" -o -name "Makefile.in" -o -name "configure.in" -o -name "Makefile" \
-o -name "*.spec" -o -name "*.m4"`
do
AN_BUILD_FILES="$AN_BUILD_FILES `echo $file | cut -c3-`"
done
cat ${TEMPLATE} | while read line; do
eval "echo ${line}" >>${PRJ_FILE}
done
echo "Created project file ${PRJ_FILE} successfully."
\rm -f ${TMPFILE}
exit 0
'#' Anjuta Version ${AN_ANJUTA_VERSION:-"0.1.8"}
Compatibility Level: ${AN_ANJUTA_COMPATIBLITY:-"1"}
'<'PROJECT_DESCRIPTION_START'>'
${AN_PROJECT_DESCRIPTION:-"Some description"}'<'PROJECT_DESCRIPTION_END'>'
'<'CONFIG_PROGS_START'>'
'<'CONFIG_PROGS_END'>'
'<'CONFIG_LIBS_START'>'
'<'CONFIG_LIBS_END'>'
'<'CONFIG_HEADERS_START'>'
'<'CONFIG_HEADERS_END'>'
'<'CONFIG_CHARACTERISTICS_START'>'
'<'CONFIG_CHARACTERISTICS_END'>'
'<'CONFIG_LIB_FUNCS_START'>'
'<'CONFIG_LIB_FUNCS_END'>'
'<'CONFIG_ADDITIONAL_START'>'
'<'CONFIG_ADDITIONAL_END'>'
'<'CONFIG_FILES_START'>'
'<'CONFIG_FILES_END'>'
'<'MAKEFILE_AM_START'>'
'<'MAKEFILE_AM_END'>'
props.file.type=project
anjuta.version=${AN_ANJUTA_VERSION:-"0.1.8"}
anjuta.compatibility.level=${AN_ANJUTA_COMPATIBILITY:-"1"}
project.name=${AN_PROJECT_NAME:-"unknown"}
project.type=${AN_PROJECT_TYPE:-"GENERIC"}
project.target.type=${AN_PROJECT_TARGET_TYPE:="EXECUTABLE"}
project.version=${AN_PROJECT_VERSION:-"0.1"}
project.author=${AN_PROJECT_AUTHOR:-"$(whoami)"}
project.source.target=${AN_PROJECT_TARGET:-"unknown"}
project.has.gettext=${AN_HAVE_GETTEXT:-"0"}
project.programming.language=${AN_PROJECT_LANGUAGE:-"C"}
project.menu.entry=${AN_PROJECT_MENU_ENTRY:-"Unknown"}
project.menu.group=${AN_PROJECT_MENU_GROUP:-"Application"}
project.menu.comment=${AN_PROJECT_MENU_COMMENT:="No comment"}
project.menu.icon=${AN_PROJECT_MENU_ICON:-"unknown_icon.xpm"}
project.menu.need.terminal=${AN_PROJECT_NEED_TERMINAL:-"0"}
project.configure.options=
anjuta.program.arguments=
project.config.disable.overwriting=1 1 1 1 1 1 1 1 1
project.config.extra.modules.before=
project.config.extra.modules.after=
module.${AN_INCLUDE_NAME:-"include"}.name=${AN_PROJECT_INCLUDE_DIR:-"."}
module.${AN_INCLUDE_NAME:-"include"}.type=
module.${AN_INCLUDE_NAME:-"include"}.expanded=0
module.${AN_INCLUDE_NAME:-"include"}.files=${AN_HEADER_FILES}
module.source.name=${AN_PROJECT_SRC_DIR:-"."}
module.source.type=
module.source.expanded=1
module.source.files=${AN_SOURCE_FILES}
module.pixmap.name=${AN_PROJECT_PIXMAP_DIR:-"."}
module.pixmap.type=
module.pixmap.expanded=0
module.pixmap.files=${AN_PIXMAP_FILES}
module.data.name=${AN_PROJECT_DATA_DIR:-"."}
module.data.type=
module.data.expanded=0
module.data.files=${AN_DATA_FILES}
module.help.name=${AN_PROJECT_HELP_DIR:-"."}
module.help.type=
module.help.expanded=0
module.help.files=${AN_HELP_FILES}
module.doc.name=${AN_PROJECT_DOC_DIR:-"."}
module.doc.type=
module.doc.expanded=0
module.doc.files=${AN_DOC_FILES}
module.po.expanded=0
module.po.files=${AN_PO_FILES}
compiler.options.supports=
compiler.options.include.paths=${AN_INCLUDE_PATHS:-". .."}
compiler.options.library.paths=${AN_LIBRARY_PATHS}
compiler.options.libraries=${AN_LIBRARIES}
compiler.options.libraries.selected=${AN_NUM_LIBRARIES:-"0"}
compiler.options.defines=${AN_DEFINES:-"HAVE_CONFIG_H"}
compiler.options.warning.buttons=0 0 1 1 0 1 0 0 0 0 0 0 0 1 0 0
compiler.options.optimize.buttons=0 0 1 0
compiler.options.other.buttons=1 0
compiler.options.other.c.flags=${AN_CFLAGS}
compiler.options.other.l.flags=${AN_LDFLAGS}
compiler.options.other.l.libs=${AN_LDADD}
project.source.paths=${AN_SRC_PATHS}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment