In addition of not needing autodist.conf ther DISTDEFS variable
in the configuration file is now optional. If it doesn't exist
the distdefs file is not created.
Also the 'default' distribution doesn't have to define and distdefs
anymore to still be valid distribution.
# The distdef header will be created by the Autodist. It need to be included
# in the source code in order for the preprocessor to respect distdef
# The distdef header will be created by the Autodist. It need to be included
# in the source code in order for the preprocessor to respect distdef
-# conditionals in source code. Example:
+# conditionals in source code. If your project doesn't need distdefs you
+# can comment this out. Example:
#
# DISTDEFS="include/distdefs.h"
#
#
# DISTDEFS="include/distdefs.h"
#
| grep "define " | cut -d' ' -f2 | sort | uniq`
if test "$inhs" = "" && test "$defs" = ""; then
| grep "define " | cut -d' ' -f2 | sort | uniq`
if test "$inhs" = "" && test "$defs" = ""; then
- ad_fatal "Distribution '$1' does not define anything"
+ if test "$1" != "default"; then
+ ad_fatal "Distribution '$1' does not define anything"
+ fi
fi
# Get undefined distdefs
fi
# Get undefined distdefs
do
echo $i >>autodist.tmp.defs
done
do
echo $i >>autodist.tmp.defs
done
- distdefs=`sort < autodist.tmp.defs | uniq`
+ if test -f autodist.tmp.defs; then
+ distdefs=`sort < autodist.tmp.defs | uniq`
+ fi
distdefs=`echo $distdefs`
rm -f autodist.tmp.defs
distdefs=`echo $distdefs`
rm -f autodist.tmp.defs
###############################################################################
# Autodist code
###############################################################################
# Autodist code
-usage="Usage: autodist [options] [distribution] [version] [params]"
+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,
help="\
Autodist prepares source tree for configuration, compilation and
distribution. Generates Automake.am files from Automake.ad files,
#
if test "$DISTDEFS"; then
ad_create_distdefs_h
#
if test "$DISTDEFS"; then
ad_create_distdefs_h
-else
- ad_fatal "DISTDEFS not defined in $distdir/autodist.conf"
fi
# Get extra parameters from command line
fi
# Get extra parameters from command line