Simplify handling of source directory in asn compile wrapper.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 27 May 2008 16:13:50 +0000 (18:13 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 27 May 2008 16:13:50 +0000 (18:13 +0200)
source/heimdal_build/asn1_compile_wrapper.sh
source/heimdal_build/asn1_deps.pl

index 96677c7e8e659dbc233c73ad3a61b75c830c6276..c449bf80657642adccaedfbc36c62d760b6efbd6 100755 (executable)
@@ -4,21 +4,15 @@
 SELF=$0
 SELFDIR=`dirname ${SELF}`
 
-SRCDIR=$1
-BUILDDIR=$2
-DESTDIR=$3
+BUILDDIR=$1
+DESTDIR=$2
 
-CMD=$4
-FILE=$5
-NAME=$6
-shift 6
+CMD=$3
+FILE=$4
+NAME=$5
+shift 5
 OPTIONS="$@"
 
-test -z "${SRCDIR}" && {
-       echo "${SELF}:SRCDIR: '${SRCDIR}'" >&2;
-       exit 1;
-}
-
 test -z "${BUILDDIR}" && {
        echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
        exit 1;
@@ -46,14 +40,6 @@ test -z "${NAME}" && {
 
 CURDIR=`pwd`
 
-cd ${SRCDIR} && {
-       ABS_SRCDIR=`pwd`
-       cd ${CURDIR}
-} || {
-       echo "${SELF}:cannot cd into '${SRCDIR}'" >&2;
-       exit 1;
-}
-
 cd ${BUILDDIR} && {
        ABS_BUILDDIR=`pwd`
        cd ${CURDIR}
@@ -63,7 +49,7 @@ cd ${BUILDDIR} && {
 }
 
 cd ${DESTDIR} && {
-       ${ABS_BUILDDIR}/${CMD} ${OPTIONS} ${ABS_SRCDIR}/${FILE} ${NAME} >&2 || exit 1;
+       ${ABS_BUILDDIR}/${CMD} ${OPTIONS} ${FILE} ${NAME} >&2 || exit 1;
        cd ${CURDIR}
 } || {
        echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
index 16b2bd7dbee427e778638da2b0ebf0a549e0f4ef..612178176074143767e732f9c76082b87a7a14a9 100755 (executable)
@@ -31,7 +31,7 @@ my $header = "$dirname/$prefix.h";
 
 print "$header: \$(heimdalsrcdir)/$file \$(ASN1C)\n";
 print "\t\@echo \"Compiling ASN1 file \$(heimdalsrcdir)/$file\"\n";
-print "\t\@\$(heimdalbuildsrcdir)/asn1_compile_wrapper.sh \$(srcdir) \$(builddir) $dirname \$(ASN1C) \$(heimdalsrcdir)/$file $prefix $options\n\n";
+print "\t\@\$(heimdalbuildsrcdir)/asn1_compile_wrapper.sh \$(builddir) $dirname \$(ASN1C) \$(abspath \$(heimdalsrcdir)/$file) $prefix $options\n\n";
 
 open(IN,"heimdal/$file") or die("Can't open heimdal/$file: $!");
 my @lines = <IN>;