From f83832eabd27e64a7fda3c9f842346a03d0b7b22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Wed, 9 Oct 1996 16:05:40 +0200
Subject: [PATCH] bugfix

Rev: bin/export.pike:1.2
Rev: src/Makefile.src:1.12
---
 bin/export.pike  | 22 ++++++++++------------
 src/Makefile.src |  4 ++++
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/bin/export.pike b/bin/export.pike
index 5ee029b84f..56d19efdad 100755
--- a/bin/export.pike
+++ b/bin/export.pike
@@ -2,6 +2,8 @@
 
 #include <simulate.h>
 
+multiset except_modules  =(<>);
+
 string *get_files(string path)
 {
   string *files,tmp,*ret;
@@ -14,14 +16,11 @@ string *get_files(string path)
     if(tmp[0]=='#' && tmp[-1]=='#') continue;
     if(tmp[0]=='.' && tmp[1]=='#') continue;
 
+    if(path=="pike/src/modules" && except_modules[tmp])
+      continue;
+
     tmp=path+"/"+tmp;
-    switch(tmp)
-    {
-      case "pike/src/modules/image":
-      case "pike/src/modules/spider":
-      case "pike/src/modules/pipe":
-	continue;
-    }
+
     if(file_size(tmp)==-2)
     {
       ret+=get_files(tmp);
@@ -55,17 +54,16 @@ int main(int argc, string *argv)
   string *files;
   string s=replace(version()," ","_");
 
-  tmp=explode(argv[0],"/");
-  tmp=reverse(tmp);
+  tmp=reverse(argv[0]/"/");
+  except_modules=mklist(argv[1..]);
   e=search(tmp,"pike");
   if(e==-1)
   {
     perror("Couldn't find Pike source dir.\n");
-    perror("Use export.pike <sourcedir>.\n");
+    perror("Use /full/path/export.pike <except modules>.\n");
     exit(1);
   }
-  tmp=tmp[e+1..sizeof(tmp)-1];
-  tmp=reverse(tmp);
+  tmp=reverse(tmp[e+1..]);
   cd(tmp*"/");
   perror("Sourcedir = "+tmp*"/"+"/pike\n");
 
diff --git a/src/Makefile.src b/src/Makefile.src
index ccbded7699..abbb7f6888 100644
--- a/src/Makefile.src
+++ b/src/Makefile.src
@@ -193,6 +193,10 @@ run_hilfe:
 # Beware that export archive this includes bison/yacc/byacc source
 # and thus has to follow the rules stated in that code.
 export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend
+	chmod +x $(SRCDIR)/install-sh
+	$(RUNPIKE) $(TMP_BINDIR)/export.pike image pipe spider
+
+full_export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend
 	chmod +x $(SRCDIR)/install-sh
 	$(RUNPIKE) $(TMP_BINDIR)/export.pike
 
-- 
GitLab