TARGET_SRC for not only C files but also C++
This commit is contained in:
parent
d743bea3e6
commit
9369a6ab1a
|
@ -55,7 +55,11 @@ cat $HELP_FILE > Makefile
|
||||||
echo >> Makefile
|
echo >> Makefile
|
||||||
|
|
||||||
# ======= Test for target =======
|
# ======= Test for target =======
|
||||||
[ ! -f $REP_TARGET.c ] && echo "$REP_TARGET.c doesn't exist" && exit -1
|
TARGET_SRC=
|
||||||
|
for ext in c cpp cxx cc; do
|
||||||
|
[ -f "$REP_TARGET.$ext" ] && TARGET_SRC=$REP_TARGET.$ext && break
|
||||||
|
done
|
||||||
|
[ "$TARGET_SRC" == "" ] && echo "source file for $REP_TARGET not found" && exit -1
|
||||||
|
|
||||||
# ======= Environment =======
|
# ======= Environment =======
|
||||||
sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \
|
sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \
|
||||||
|
@ -90,11 +94,11 @@ echo >> Makefile
|
||||||
cat $RULES_FILE >> Makefile
|
cat $RULES_FILE >> Makefile
|
||||||
|
|
||||||
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~g"`
|
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~g"`
|
||||||
flist[0]=$REP_TARGET.c
|
flist[0]=$TARGET_SRC
|
||||||
fpath[0]=$REP_TARGET.c
|
fpath[0]=$TARGET_SRC
|
||||||
nfiles=1
|
nfiles=1
|
||||||
nparsed=0
|
nparsed=0
|
||||||
fdeplist[0]=`remove_c_comments.pl $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
fdeplist[0]=`remove_c_comments.pl $TARGET_SRC | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||||
files_not_found=
|
files_not_found=
|
||||||
while [ $nfiles != $nparsed ]; do
|
while [ $nfiles != $nparsed ]; do
|
||||||
for f in ${fdeplist[$nparsed]}; do
|
for f in ${fdeplist[$nparsed]}; do
|
||||||
|
|
|
@ -16,12 +16,12 @@ long_line_behaviour=1
|
||||||
long_line_column=72
|
long_line_column=72
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
current_page=2
|
current_page=4
|
||||||
FILE_NAME_0=21;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser_test.c;0
|
FILE_NAME_0=21;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser_test.c;0
|
||||||
FILE_NAME_1=298;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser.c;0
|
FILE_NAME_1=298;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser.c;0
|
||||||
FILE_NAME_2=0;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser.h;0
|
FILE_NAME_2=321;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser.h;0
|
||||||
FILE_NAME_3=133;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser_tags.h;0
|
FILE_NAME_3=133;C;0;16;1;1;1;/home/kolan/dev/c/tex_parser/tex_parser_tags.h;0
|
||||||
FILE_NAME_4=1831;Make;0;16;1;1;1;/home/kolan/dev/c/tex_parser/Makefile;0
|
FILE_NAME_4=1884;Make;0;16;1;1;1;/home/kolan/dev/c/tex_parser/Makefile;0
|
||||||
|
|
||||||
[build-menu]
|
[build-menu]
|
||||||
NF_00_LB=_Сделать
|
NF_00_LB=_Сделать
|
||||||
|
|
Loading…
Reference in New Issue