projects
/
autodist.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed distdef prefix handling and processing of non-source files
[autodist.git]
/
apps
/
autodist
/
autodist.in
diff --git
a/apps/autodist/autodist.in
b/apps/autodist/autodist.in
index 8d5c97737d8f7f2310435496413970b4ac01fc56..b4c1d864296bf6c3e564fb5df326995783ff2cb4 100755
(executable)
--- a/
apps/autodist/autodist.in
+++ b/
apps/autodist/autodist.in
@@
-570,8
+570,10
@@
ad_process_ads()
ad_debug "Processing $i to be $fname"
ad_log " $i into $fname"
ad_debug "Processing $i to be $fname"
ad_log " $i into $fname"
+ rm -f $fname
+
# Run the distribution processing for this file
# Run the distribution processing for this file
- ad_process_file $
i
$fname false
+ ad_process_file $
orig
$fname false
if test '!' -f "$fname"; then
cp -p $orig $fname || exit 1
if test '!' -f "$fname"; then
cp -p $orig $fname || exit 1
@@
-834,9
+836,9
@@
ad_process_tree()
\! -name \*\.[cC][pP][pP] -a \
\! -name \*\.[cC]++ -a \
\! -name \*\.m -a \
\! -name \*\.[cC][pP][pP] -a \
\! -name \*\.[cC]++ -a \
\! -name \*\.m -a \
- \! -name \*\.mm -
o
\
- \! -name \*\.M -
o
\
- \! -name \*\.S -
o
\
+ \! -name \*\.mm -
a
\
+ \! -name \*\.M -
a
\
+ \! -name \*\.S -
a
\
\! -name \*\.[hH] -a \
\! -name \*\.hh -a \
\! -name \*\.[cC]\.in -a \
\! -name \*\.[hH] -a \
\! -name \*\.hh -a \
\! -name \*\.[cC]\.in -a \
@@
-1546,11
+1548,11
@@
ad_process_file()
fi
# Get defined distribution defines
fi
# Get defined distribution defines
- defs=`awk "/^#ifdef
"$DP"_DIST_|^#else "$DP"
_DIST_/ { print; }" \
+ defs=`awk "/^#ifdef
${DP}_DIST_|^#else ${DP}
_DIST_/ { print; }" \
$1 |cut -d'*' -f2 |cut -d' ' -f2 | sort | uniq`
# Get explicitly not-defined distribution defines
$1 |cut -d'*' -f2 |cut -d' ' -f2 | sort | uniq`
# Get explicitly not-defined distribution defines
- ndefs=`awk "/^#ifndef
"$DP"_DIST_|^#else !"$DP"
_DIST_/ { print; }" \
+ ndefs=`awk "/^#ifndef
${DP}_DIST_|^#else !${DP}
_DIST_/ { print; }" \
$1 |cut -d'*' -f2 |cut -d' ' -f2 | cut -d'!' -f2 | sort | uniq`
ad_debug "defs in $1: $defs"
$1 |cut -d'*' -f2 |cut -d' ' -f2 | cut -d'!' -f2 | sort | uniq`
ad_debug "defs in $1: $defs"
@@
-1657,11
+1659,11
@@
ad_process_source_file()
fi
# Get defined distribution defines
fi
# Get defined distribution defines
- defs=`awk
'/^#ifdef SILC_DIST_|^#else \/\* SILC_DIST_/ { print; }'
\
+ defs=`awk
"/^#ifdef ${DP}_DIST_|^#else \/\* ${DP}_DIST_/ { print; }"
\
$1 |cut -d'*' -f2 |cut -d' ' -f2 | sort | uniq`
# Get explicitly not-defined distribution defines
$1 |cut -d'*' -f2 |cut -d' ' -f2 | sort | uniq`
# Get explicitly not-defined distribution defines
- ndefs=`awk
'/^#ifndef SILC_DIST_|^#else \/\* \!SILC_DIST_/ { print; }'
\
+ ndefs=`awk
"/^#ifndef ${DP}_DIST_|^#else \/\* \!${DP}_DIST_/ { print; }"
\
$1 |cut -d'*' -f2 |cut -d' ' -f2 | cut -d'!' -f2 | sort | uniq`
ad_debug "defs in $1: $defs"
$1 |cut -d'*' -f2 |cut -d' ' -f2 | cut -d'!' -f2 | sort | uniq`
ad_debug "defs in $1: $defs"
@@
-1721,7
+1723,7
@@
ad_process_source_file()
# Those distdef lines that remain in the file are removed to make
# the appearance prettier
# Those distdef lines that remain in the file are removed to make
# the appearance prettier
- echo "/^#ifdef
SILC_DIST_|^#endif \/\* SILC_DIST_|^#else \/\* SILC_DIST_|^#else \/\* \!SILC_DIST_|^#ifndef SILC
_DIST_/ { next; }" >> $f
+ echo "/^#ifdef
"$DP"_DIST_|^#endif \/\* "$DP"_DIST_|^#else \/\* "$DP"_DIST_|^#else \/\* \!"$DP"_DIST_|^#ifndef "$DP"
_DIST_/ { next; }" >> $f
echo "{ print; }" >> $f
# Execute the script
echo "{ print; }" >> $f
# Execute the script