r3651: Add a new configure option --with-eparserdir
authorAndrew Bartlett <abartlet@samba.org>
Wed, 10 Nov 2004 03:08:59 +0000 (03:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:41 +0000 (13:05 -0500)
This allows us to call 'make eparser_idl', generate the files required
by the ethereal pidl plugin, and put them in the right place.  (See
lorikeet/ethereal)

Andrew Bartlett
(This used to be commit bd9497b092335b2646a1955ea7c55ad33eb7d538)

source4/build/smb_build/check_path.m4
source4/build/smb_build/makefile.pl
source4/script/build_idl.sh

index bfd15d3d8cc4f4730f3dfb9bd31018082edb1eeb..5ceda46d8716fb15c8be2fecf5673595759e047d 100644 (file)
@@ -107,6 +107,24 @@ AC_ARG_WITH(logfilebase,
     ;;
   esac])
 
+#################################################
+# set configuration directory location
+eparserdir=""
+
+AC_ARG_WITH(eparserdir,
+[  --with-eparserdir=DIR    Where to put output for the Ethereal/PIDL plugin],
+[ case "$withval" in
+  yes|no)
+  #
+  # Just in case anybody does it
+  #
+    AC_MSG_ERROR([--with-eparserdir called without argument])
+  ;;
+  * )
+    eparserdir="$withval"
+    ;;
+  esac])
+
 AC_SUBST(configdir)
 AC_SUBST(lockdir)
 AC_SUBST(piddir)
@@ -114,6 +132,7 @@ AC_SUBST(logfilebase)
 AC_SUBST(privatedir)
 AC_SUBST(bindir)
 AC_SUBST(sbindir)
+AC_SUBST(eparserdir)
 
 debug=no
 AC_ARG_ENABLE(debug, 
index 9664728e9352460269b7aad0aeec98621376ff41..a5e86e76f0548a2126ccb5b5d5aaeb3180f22847 100644 (file)
@@ -29,6 +29,7 @@ exec_prefix=\@exec_prefix\@
 VPATH=\@srcdir\@
 srcdir=\@srcdir\@
 builddir=\@builddir\@
+eparserdir=\@eparserdir\@
 
 BASEDIR= \@prefix\@
 BINDIR = \@bindir\@
@@ -37,6 +38,7 @@ LIBDIR = \@libdir\@
 CONFIGDIR = \@configdir\@
 VARDIR = \@localstatedir\@
 
+
 # The permissions to give the executables
 INSTALLPERMS = 0755
 
@@ -125,7 +127,10 @@ idl_full: build/pidl/idl.pm
        CPP=\"\@CPP\@\" PERL=\"\$(PERL)\" script/build_idl.sh FULL
 
 idl: build/pidl/idl.pm
-       \@CPP=\"\@CPP\@\" script/build_idl.sh
+       \@CPP=\"\@CPP\@\" script/build_idl.sh PARTIAL
+
+eparser_idl: build/pidl/idl.pm
+       CPP=\"\@CPP\@\" PERL=\"\$(PERL)\" EPARSERPREFIX=\"\$(eparserdir)\" script/build_idl.sh EPARSER 
 
 build/pidl/idl.pm: build/pidl/idl.yp
        -yapp -s build/pidl/idl.yp
index ec67c0aec03b756fa7622580311e0aed0df96724..6e4e049cb7f5d9714c70d14d88fa5544fbc410d5 100755 (executable)
@@ -5,6 +5,7 @@ FULLBUILD=$1
 [ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1
 
 PIDL="$PERL ./build/pidl/pidl.pl --output librpc/gen_ndr/ndr_ --parse --header --parser --server"
+EPARSERPIDL="$PERL ./build/pidl/pidl.pl --output $EPARSERPREFIX/ndr_ --parse --header --eparser"
 TABLES="$PERL ./build/pidl/tables.pl --output librpc/gen_ndr/tables"
 
 if [ x$FULLBUILD = xFULL ]; then
@@ -16,6 +17,12 @@ if [ x$FULLBUILD = xFULL ]; then
       exit 0
 fi
 
+if [ x$FULLBUILD = xEPARSER ]; then
+      echo Rebuilding all idl files in librpc/idl
+      $EPARSERPIDL librpc/idl/*.idl || exit 1
+      exit 0
+fi
+
 list=""
 
 for f in librpc/idl/*.idl; do