OSDN Git Service

Modification for VER0.1.0
authorwww <www@dev.minakoe.jp>
Fri, 3 Sep 2010 22:44:10 +0000 (18:44 -0400)
committerwww <www@dev.minakoe.jp>
Fri, 3 Sep 2010 22:44:10 +0000 (18:44 -0400)
Makefile
Readme [deleted file]
add_version.pl

index 9c6b52a..52099d5 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -108,3 +108,6 @@ real_clean:
 
 test:
        t/test;
+
+dist:
+       perl add_version.pl --release;
diff --git a/Readme b/Readme
deleted file mode 100755 (executable)
index c12a2e3..0000000
--- a/Readme
+++ /dev/null
@@ -1,34 +0,0 @@
-[About this module]\r
-This library offers the procedure which you want to use in many cases when you are developing, especially when you are developing for web application or backend application for it.\r
-This library is created by Hajime Kurita.\r
-The name 1stclass derives from the fact that the code is used for web application of http://www.1stclass.co.jp/\r
-\r
-Example:\r
-Blog search & analysis system: http://minakoe.jp/\r
-Japanese works database: http://www.accessup.org/anime/\r
-\r
-The code is distributed on http://sourceforge.jp/projects/lib1stclass/\r
-More detailed information is avaiable on blog.\r
-Japanese: http://www.accessup.org/pj/6_B4C9CDFDBFCDA4B5A4F3/5/list.html\r
-\r
-[License]\r
-You can use this under the license of GPL ver.3.\r
-\r
-[Install]\r
-make clean;\r
-make;\r
-make test;\r
-make install;\r
-\r
-[Usage]\r
-For C,\r
-lib1stclass.so\r
-lib1stclass.a\r
-\r
-For C++,\r
-lib1stclass_cxx.so\r
-lib1stclass_cxx.a\r
-\r
-are available.\r
-\r
-You can find functions, methods and how to use this library by reading the source code of t/test.cpp.\r
index f4602ea..76b6861 100755 (executable)
@@ -1,6 +1,13 @@
 #!/usr/bin/perl\r
 use strict;\r
 use FileHandle;\r
+my $release=0;\r
+foreach my $ARGV (@ARGV){\r
+  if($ARGV=~ m!^--release!){\r
+    $release++;\r
+  }\r
+}\r
+\r
 my $version='';\r
 if(my $fh=new FileHandle("Changes")){\r
   while(<$fh>){\r
@@ -13,16 +20,26 @@ if(my $fh=new FileHandle("Changes")){
   $fh->close();\r
 }\r
 if($version){\r
-  my @files=('/usr/local/include/lib1stclass.hpp', '/usr/local/include/lib1stclass.h');\r
-  foreach my $file (@files){\r
-    if(my $fh=new FileHandle($file)){\r
-      local $/=undef;\r
-      my $con=<$fh>;\r
-      $fh->close();\r
-      unless($con=~ m!// VERSION=[\d\.]+ //!){\r
-        if(my $fh=new FileHandle('>> '.$file)){\r
-          print $fh "\n// VERSION=".$version."//\n";\r
-          $fh->close();\r
+  if($release){\r
+    my $dir='lib1stclass-'.$version;\r
+    my @cm=('mkdir '.$dir, 'cp *.c '.$dir, 'cp *.cpp '.$dir, 'cp *.h '.$dir, 'cp *.hpp '.$dir, 'cp *.pl '.$dir, 'cp Makefile '.$dir, 'cp Changes '.$dir, 'cp README '.$dir, 'mkdir -p '.$dir.'/t', 'cp t/*.cpp '.$dir.'/t', 'cp t/*.c '.$dir.'/t', 'tar cvf '.$dir.'.tar '.$dir, 'gzip '.$dir.'.tar');\r
+    foreach my $cm (@cm){\r
+      print $cm."\n";\r
+      system($cm);\r
+    }\r
+  }\r
+  else{\r
+    my @files=('/usr/local/include/lib1stclass.hpp', '/usr/local/include/lib1stclass.h');\r
+    foreach my $file (@files){\r
+      if(my $fh=new FileHandle($file)){\r
+        local $/=undef;\r
+        my $con=<$fh>;\r
+        $fh->close();\r
+        unless($con=~ m!// VERSION=[\d\.]+ //!){\r
+          if(my $fh=new FileHandle('>> '.$file)){\r
+            print $fh "\n// VERSION=".$version."//\n";\r
+            $fh->close();\r
+          }\r
         }\r
       }\r
     }\r