mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r20804: work arround HPUX and Tru64 make which don't like $$startdir
we now call asn1_compile and compile_et via a wrapper script metze
This commit is contained in:
parent
1feae45f28
commit
a5b67f5c7e
73
source/heimdal_build/asn1_compile_wrapper.sh
Executable file
73
source/heimdal_build/asn1_compile_wrapper.sh
Executable file
@ -0,0 +1,73 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
SELF=$0
|
||||
SELFDIR=`dirname ${SELF}`
|
||||
|
||||
SRCDIR=$1
|
||||
BUILDDIR=$2
|
||||
DESTDIR=$3
|
||||
|
||||
CMD=$4
|
||||
FILE=$5
|
||||
NAME=$6
|
||||
shift 6
|
||||
OPTIONS="$@"
|
||||
|
||||
test -z "${SRCDIR}" && {
|
||||
echo "${SELF}:SRCDIR: '${SRCDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${BUILDDIR}" && {
|
||||
echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${DESTDIR}" && {
|
||||
echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${CMD}" && {
|
||||
echo "${SELF}:CMD: '${CMD}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${FILE}" && {
|
||||
echo "${SELF}:FILE: '${FILE}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${NAME}" && {
|
||||
echo "${SELF}:NAME: '${NAME}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
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}
|
||||
} || {
|
||||
echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
cd ${DESTDIR} && {
|
||||
${ABS_BUILDDIR}/${CMD} ${OPTIONS} ${ABS_SRCDIR}/${FILE} ${NAME} >&2 || exit 1;
|
||||
cd ${CURDIR}
|
||||
} || {
|
||||
echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
exit 0;
|
@ -25,7 +25,7 @@ my $header = "$dirname/$prefix.h";
|
||||
|
||||
print "$header: $file bin/asn1_compile\n";
|
||||
print "\t\@echo \"Compiling ASN1 file $file\"\n";
|
||||
print "\t\@startdir=`pwd` && cd $dirname && " . ' $$startdir/bin/asn1_compile ' . " $options " . '$$startdir/' . "$file $prefix\n\n";
|
||||
print "\t\@\$(builddir)/heimdal_build/asn1_compile_wrapper.sh \$(srcdir) \$(builddir) $dirname bin/asn1_compile $file $prefix $options\n\n";
|
||||
|
||||
open(IN,$file) or die("Can't open $file: $!");
|
||||
foreach(<IN>) {
|
||||
@ -49,19 +49,19 @@ print '[SUBSYSTEM::HEIMDAL_'.uc($prefix).']'."\n";
|
||||
print "CFLAGS = -Iheimdal_build -I$dirname\n";
|
||||
print "OBJ_FILES = ";
|
||||
foreach $o_file (@o_files) {
|
||||
print "\\\n\t$o_file ";
|
||||
print "\\\n\t$o_file";
|
||||
}
|
||||
print "\nPRIVATE_DEPENDENCIES = HEIMDAL_ASN1\n\n";
|
||||
|
||||
print "clean:: \n";
|
||||
print "\t\@echo \"Deleting ASN1 output files generated from $file\"";
|
||||
print "\n\t\@rm -f $header";
|
||||
print "\t\@echo \"Deleting ASN1 output files generated from $file\"\n";
|
||||
print "\t\@rm -f $header\n";
|
||||
foreach $c_file (@c_files) {
|
||||
print "\n\t\@rm -f $c_file";
|
||||
print "\t\@rm -f $c_file\n";
|
||||
}
|
||||
foreach $x_file (@x_files) {
|
||||
print "\n\t\@rm -f $x_file";
|
||||
print "\t\@rm -f $x_file\n";
|
||||
}
|
||||
print "\n\t\@rm -f $dirname/$prefix\_files";
|
||||
print "\n\t\@rm -f $dirname/$prefix\.h";
|
||||
print "\n\n";
|
||||
print "\t\@rm -f $dirname/$prefix\_files\n";
|
||||
print "\t\@rm -f $dirname/$prefix\.h\n";
|
||||
print "\n";
|
||||
|
66
source/heimdal_build/et_compile_wrapper.sh
Executable file
66
source/heimdal_build/et_compile_wrapper.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
SELF=$0
|
||||
SELFDIR=`dirname ${SELF}`
|
||||
|
||||
SRCDIR=$1
|
||||
BUILDDIR=$2
|
||||
DESTDIR=$3
|
||||
|
||||
CMD=$4
|
||||
FILE=$5
|
||||
shift 5
|
||||
|
||||
test -z "${SRCDIR}" && {
|
||||
echo "${SELF}:SRCDIR: '${SRCDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${BUILDDIR}" && {
|
||||
echo "${SELF}:BUILDDIR: '${BUILDDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${DESTDIR}" && {
|
||||
echo "${SELF}:DESTDIR: '${DESTDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${CMD}" && {
|
||||
echo "${SELF}:CMD: '${CMD}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
test -z "${FILE}" && {
|
||||
echo "${SELF}:FILE: '${FILE}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
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}
|
||||
} || {
|
||||
echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
cd ${DESTDIR} && {
|
||||
${ABS_BUILDDIR}/${CMD} ${ABS_SRCDIR}/${FILE} >&2 || exit 1;
|
||||
cd ${CURDIR}
|
||||
} || {
|
||||
echo "${SELF}:cannot cd into '${BUILDDIR}'" >&2;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
exit 0;
|
@ -10,7 +10,7 @@ my $header = "$dirname/$basename"; $header =~ s/\.et$/.h/;
|
||||
my $source = "$dirname/$basename"; $source =~ s/\.et$/.c/;
|
||||
print "$header $source: $file bin/compile_et\n";
|
||||
print "\t\@echo \"Compiling error table $file\"\n";
|
||||
print "\t\@startdir=`pwd` && cd $dirname && " . '$$startdir/bin/compile_et $$startdir/' . "$file\n\n";
|
||||
print "\t\@\$(builddir)/heimdal_build/et_compile_wrapper.sh \$(srcdir) \$(builddir) $dirname bin/compile_et $file\n\n";
|
||||
|
||||
print "clean:: \n";
|
||||
print "\n\t\@rm -f $header $source";
|
||||
print "\t\@rm -f $header $source\n\n";
|
||||
|
Loading…
Reference in New Issue
Block a user