OSDN Git Service

Add: Template of Makefile in Small Tools. v2.0.2p0035
authorkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Fri, 17 Oct 2014 03:44:53 +0000 (12:44 +0900)
committerkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Fri, 17 Oct 2014 03:44:53 +0000 (12:44 +0900)
        new file:   Small Tools/Template/Makefile/Makefile
        new file:   Small Tools/Template/Makefile/Makefile-lib
        new file:   Small Tools/mrcImage/Makefile
Modify: Rename Subfile .config -> -lib
modified:   CTFCorrection/CTFCorrection2/Makefile.config
modified:   CTFCorrection/CTFCorrection4/Makefile.config
modified:   CTFCorrection/CTFCorrection5/Makefile.config
modified:   Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
renamed:    Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile.config -> Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib
modified:   TIPS/BackImage/Makefile
renamed:    TIPS/BackImage/Makefile.config -> TIPS/BackImage/Makefile-lib
modified:   TIPS/CreateGridImage/Makefile
renamed:    TIPS/CreateGridImage/Makefile.config -> TIPS/CreateGridImage/Makefile-lib
renamed:    TIPS/Help/Makefile.config -> TIPS/Help/Makefile-lib
modified:   TIPS/LoopCommand/Makefile
renamed:    TIPS/LoopCommand/Makefile.config -> TIPS/LoopCommand/Makefile-lib
modified:   TIPS/MaskImage/Makefile
renamed:    TIPS/MaskImage/Makefile.config -> TIPS/MaskImage/Makefile-lib
modified:   TIPS/NulImage/Makefile
renamed:    TIPS/NulImage/Makefile.config -> TIPS/NulImage/Makefile-lib

19 files changed:
CTFCorrection/CTFCorrection2/Makefile.config
CTFCorrection/CTFCorrection4/Makefile.config
CTFCorrection/CTFCorrection5/Makefile.config
Small Tools/Template/Makefile/Makefile [new file with mode: 0644]
Small Tools/Template/Makefile/Makefile-lib [new file with mode: 0644]
Small Tools/mrcImage/Makefile [new file with mode: 0644]
Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile
Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile-lib [moved from Small Tools/mrcImage/mrcImageFourierNeighborCorrelation/Makefile/Makefile.config with 92% similarity]
TIPS/BackImage/Makefile
TIPS/BackImage/Makefile-lib [moved from TIPS/BackImage/Makefile.config with 96% similarity]
TIPS/CreateGridImage/Makefile
TIPS/CreateGridImage/Makefile-lib [moved from TIPS/CreateGridImage/Makefile.config with 93% similarity]
TIPS/Help/Makefile-lib [moved from TIPS/Help/Makefile.config with 100% similarity]
TIPS/LoopCommand/Makefile
TIPS/LoopCommand/Makefile-lib [moved from TIPS/LoopCommand/Makefile.config with 100% similarity]
TIPS/MaskImage/Makefile
TIPS/MaskImage/Makefile-lib [moved from TIPS/MaskImage/Makefile.config with 100% similarity]
TIPS/NulImage/Makefile
TIPS/NulImage/Makefile-lib [moved from TIPS/NulImage/Makefile.config with 100% similarity]

index 9b71337..9af5b33 100644 (file)
@@ -15,7 +15,7 @@ INPUT_3D_EXT=3d
 
 #### INCLUDE ####
 -include ../CTFCorrection1/Makefile
--include ../../TIPS/CreateGridImage/Makefile.config
+-include ../../TIPS/CreateGridImage/Makefile-lib
 -include INPUT_2D_LIST
 -include CTF_2D_LIST
 -include FFT_2D_LIST
index 68fbe95..0133988 100644 (file)
@@ -9,7 +9,7 @@
 #### Suffixes rule ####
 
 #### INCLUDE ####
--include ../../TIPS/LoopCommand/Makefile.config
+-include ../../TIPS/LoopCommand/Makefile-lib
 -include ../CTFCorrection2/Makefile.config
 
 #### Definition ####
index 25f0541..05d8294 100644 (file)
@@ -8,7 +8,7 @@
 
 #### INCLUDE ####
 -include ../CTFCorrection3/Makefile.config
--include ../../TIPS/LoopCommand/Makefile.config
+-include ../../TIPS/LoopCommand/Makefile-lib
 
 #### Definition ####
 
diff --git a/Small Tools/Template/Makefile/Makefile b/Small Tools/Template/Makefile/Makefile
new file mode 100644 (file)
index 0000000..f0210bd
--- /dev/null
@@ -0,0 +1,61 @@
+#
+#      This is Main Makefile for !!Command!!.
+#
+
+#### Root Makefile ####
+MAKE_ROOT=!!Command!!
+
+#### Input extention ####
+INI=ini
+
+#### Suffixes rule ####
+# Defined at Sub
+
+#### INCLUDE ####
+-include ${EOS_HOME}/tutorial/TIPS/Help/Makefile-lib
+-include Makefile-lib
+
+#### Definition ####
+# Path of Input File
+# Basically, use a linked data from /SampleData.
+# INPUT_PATH=${EOS_HOME}/tutorial/SampleData/XXXX.mrc
+
+### FileData
+FILE_NAME=Input
+
+#### Rules of the list created ####
+# Defined at Sub
+
+##### Commands #####
+# Defined at Sub basically
+# By make Initial, Create input data for this command.
+Initial::
+       make InitialData;
+
+# By make Exe, Execute the sample of this command.
+Exe::
+
+# By make all, Initial -> Exe.
+all::
+       make Initial;
+       make Exe;
+
+help_!!Command!!::
+       @echo
+       @echo "Makefile for !!Command!!"
+       @echo "This is Main Makefile for !!Command!!."
+       @echo
+       @echo " (Command):"
+       @echo "         Initial:                Create input data for this command."
+       @echo "                 (Setting Data):"
+       @echo "                 INI:            input extention for Initial"
+       @echo
+       @echo "         Exe:                    Execute the sample of this command."
+       @echo
+       @echo "         all:                    Initial -> Exe."
+       @echo
+       @echo " (Setting Data):"
+       @echo "         FILE_NAME:              filename of input"
+
+##### Commands(Input to Output) #####
+# Defined at Sub
diff --git a/Small Tools/Template/Makefile/Makefile-lib b/Small Tools/Template/Makefile/Makefile-lib
new file mode 100644 (file)
index 0000000..0a75575
--- /dev/null
@@ -0,0 +1,28 @@
+#
+#      This is Sub Makefile for !!Command!!.
+#
+
+#### Input extention ####
+# Defined at Main
+
+#### Suffixes rule ####
+.SUFFIXES: .$(INI)
+
+#### INCLUDE ####
+# Use TIPS File.
+# -include ${EOS_HOME}/tutorial/TIPS/XXXX/Makefile-lib
+
+#### Definition ####
+# Defined at Main
+
+#### Rules of the list created ####
+
+
+##### Commands #####
+InitialData::
+       touch $(FILE_NAME).$(INI);
+       rm $(FILE_NAME).$(INI);
+       ln -s $(INPUT_PATH) $(FILE_NAME).$(INI)
+
+##### Commands(Input to Output) #####
+
diff --git a/Small Tools/mrcImage/Makefile b/Small Tools/mrcImage/Makefile
new file mode 100644 (file)
index 0000000..e6d28aa
--- /dev/null
@@ -0,0 +1,48 @@
+#
+#      This is Makefile to create the Template Makefile for Small Tools, TIPS, and so on.
+#
+
+#### Root Makefile ####
+MAKE_ROOT=makeTemplate
+
+#### INCLUDE ####
+-include ${EOS_HOME}/tutorial/TIPS/Help/Makefile-lib
+
+#### Definition ####
+# Path of Template Files.
+SOURCE="../../../Template/Makefile/"
+
+##### Commands #####
+.DEFAULT::
+       @CreateFlag=
+       @export TARGET=$@; \
+       if [ ! -z $$TARGET ] ; then \
+               CreateFlag=true; \
+       fi; \
+       if [ ! -z $$CreateFlag ] ; then \
+               make CreateInitialMakefileDirectory; \
+       fi
+
+CreateInitialMakefileDirectory::
+       @mkdir $$TARGET;
+       @cd ./$$TARGET; \
+       mkdir Makefile; \
+       cd ./Makefile; \
+       cp ${SOURCE}Makefile Makefile; \
+       cp ${SOURCE}Makefile-lib Makefile-lib; \
+       sed -e s/"!!Command!!"/"$$TARGET"/g Makefile > tmp; \
+       cp tmp Makefile; \
+       sed -e s/"!!Command!!"/"$$TARGET"/g Makefile-lib > tmp; \
+       cp tmp Makefile-lib; \
+       rm tmp;
+
+help_makeTemplate::
+       @echo
+       @echo "Makefile for Template"
+       @echo "This is Makefile to create the Template Makefile for Small Tools, TIPS, and so on."
+       @echo
+       @echo " (Command):"
+       @echo " make XXXX:      create XXXX directory and Makefile."
+       @echo "                 if exist the directory already, do not process."
+       @echo
+       
\ No newline at end of file
index c8f377b..da491a7 100644 (file)
@@ -15,8 +15,8 @@ FSC=fsc
 # Defined at Sub
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/Help/Makefile.config
--include Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/Help/Makefile-lib
+-include Makefile-lib
 
 #### Definition ####
 # Path of Input File
@@ -58,7 +58,7 @@ help_mrcImageFourierNeighborCorrelation::
        @echo " (Command):"
        @echo "         Initial:                Create Initial File for execution."
        @echo "                 (Setting Data):"
-       @echo "                 INI:            input extention"
+       @echo "                 INI:            input extention for Initial"
        @echo "                 INIpad:         for -i"
        @echo "                 MASK:           for -mask"
        @echo "                 MASKBACK:       for -maskBack"
@@ -9,8 +9,8 @@
 .SUFFIXES: .$(INI) .$(INI)info .$(FSC)
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/MaskImage/Makefile.config
--include ${EOS_HOME}/tutorial/TIPS/BackImage/Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/MaskImage/Makefile-lib
+-include ${EOS_HOME}/tutorial/TIPS/BackImage/Makefile-lib
 
 #### Definition ####
 # Defined at Main
index 910c805..71cdb38 100644 (file)
@@ -14,8 +14,8 @@ BACK=back
 # Defined at Sub
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/Help/Makefile.config
--include Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/Help/Makefile-lib
+-include Makefile-lib
 
 #### Definition ####
 ### FileData
similarity index 96%
rename from TIPS/BackImage/Makefile.config
rename to TIPS/BackImage/Makefile-lib
index bfbe100..aa1094d 100644 (file)
@@ -9,7 +9,7 @@
 .SUFFIXES: .$(NUL) .$(IN_BACK) .$(BACK)
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/NulImage/Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/NulImage/Makefile-lib
 
 #### Definition ####
 # Defined at Main
index da43ea3..9507492 100644 (file)
@@ -12,7 +12,7 @@ TIFF=tiff
 # Defined at Sub
 
 #### INCLUDE ####
--include Makefile.config
+-include Makefile-lib
 
 #### Definition ####
 ### FileData
similarity index 93%
rename from TIPS/CreateGridImage/Makefile.config
rename to TIPS/CreateGridImage/Makefile-lib
index e93d860..1422c92 100644 (file)
@@ -9,7 +9,7 @@
 .SUFFIXES: .$(NUL) .$(ONE) .$(GRID)
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/NulImage/Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/NulImage/Makefile-lib
 
 #### Definition ####
 # Defined at Main
index 25cbdc9..c8882e2 100644 (file)
@@ -9,7 +9,7 @@
 # Defined at Sub
 
 #### INCLUDE ####
--include Makefile.config
+-include Makefile-lib
 
 #### Definition ####
 ## For define varioable
index f9f67cb..d91275a 100644 (file)
@@ -13,8 +13,8 @@ MASK=mask
 # Defined at Sub
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/Help/Makefile.config
--include Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/Help/Makefile-lib
+-include Makefile-lib
 
 #### Definition ####
 ### FileData
index 8656da2..0668a7b 100644 (file)
@@ -12,8 +12,8 @@ NUL=nul
 # Defined at Sub
 
 #### INCLUDE ####
--include ${EOS_HOME}/tutorial/TIPS/Help/Makefile.config
--include Makefile.config
+-include ${EOS_HOME}/tutorial/TIPS/Help/Makefile-lib
+-include Makefile-lib
 
 #### Definition ####
 ### FileData