X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fautodist%2Fautodist.in;h=e3b67b7ab99f1de45ce67145c682c9549283b7de;hb=21b57569fd9f6cadaebcdd898dccfee177a040a8;hp=e4388ab0a4fb9fbc74b1af3485e12dec28556597;hpb=52e57c880aba9c5e89f59d962eb9af75670b76e0;p=silc.git diff --git a/apps/autodist/autodist.in b/apps/autodist/autodist.in index e4388ab0..e3b67b7a 100755 --- a/apps/autodist/autodist.in +++ b/apps/autodist/autodist.in @@ -565,16 +565,17 @@ ad_process_ads() for i in $files do fname=`echo $i | sed s/\.ad//` + orig=$i ad_debug "Processing $i to be $fname" ad_log " $i into $fname" # Run the distribution processing for this file ad_process_file $i $fname false - if test -f $fname; then - cp -p $i $fname || exit 1 - fi + if test '!' -f "$fname"; then + cp -p $orig $fname || exit 1 + fi done ad_log "" @@ -833,6 +834,9 @@ ad_process_tree() \! -name \*\.[cC][pP][pP] -a \ \! -name \*\.[cC]++ -a \ \! -name \*\.m -a \ + \! -name \*\.mm -o \ + \! -name \*\.M -o \ + \! -name \*\.S -o \ \! -name \*\.[hH] -a \ \! -name \*\.hh -a \ \! -name \*\.[cC]\.in -a \ @@ -872,8 +876,9 @@ ad_process_source_tree() { ad_debug "Starting processing source files: $1" - # We take only C/C++ files since they use the C compiler friendly - # version of distdefs. Other files are not assumed to use them. + # We take only C/C++ (and other files that are run through traditional + # preprocessor) files since they use the C compiler friendly version + # of distdefs. Other files are not assumed to use them. files=`find $am_distdir -type f \! -name \*\.ad \( \ -name \*\.[cC] -o \ -name \*\.[cC][cCpP] -o \ @@ -881,6 +886,9 @@ ad_process_source_tree() -name \*\.[cC][pP][pP] -o \ -name \*\.[cC]++ -o \ -name \*\.m -o \ + -name \*\.mm -o \ + -name \*\.M -o \ + -name \*\.S -o \ -name \*\.[hH] -o \ -name \*\.hh -o \ -name \*\.[cC]\.in -o \ @@ -1186,7 +1194,7 @@ ad_parse_distribution() prereq=`sed 's/^[ ]*//' < $distdir/$1 | grep -v "^#" \ | grep "prereq " | cut -d' ' -f2- | sort | uniq` if test '!' -z $prereq; then - if [[ $ver < $prereq ]]; then + if test "$ver" \< "$prereq"; then ad_fatal "Autodist $prereq or newer is required for distribution $1" fi fi @@ -1841,9 +1849,9 @@ ad_run_dist_hooks() usage="Usage: autodist [options] [distribution] [version] [params]" help="\ Autodist prepares source tree for configuration, compilation and -distribution. Generates Automake.am files from Automake.ad files, -configure.ac file from configure.ad file(s), generates the configure -script by running Autoconf tool, and generates Makefile.in files by +distribution. Generates Automake.am files from Automake.ad files, +configure.ac file from configure.ad file(s), generates the configure +script by running Autoconf tool, and generates Makefile.in files by running Automake tool. Operation modes: @@ -2004,7 +2012,9 @@ else fi # Get extra parameters from command line -shift +if test $# != 0; then + shift +fi # # Run pre-hooks