/[suikacvs]/webroot/www/manakai-charlib/Makefile
Suika

Diff of /webroot/www/manakai-charlib/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Sun Jul 29 04:04:43 2007 UTC revision 1.6 by wakaba, Sat Nov 8 06:59:37 2008 UTC
# Line 1  Line 1 
1  MANAKAI_ROOT_DIR = ../../../  ## TO UPDATE: make all release-update distclean
 MANAKAI_BIN_DIR = $(MANAKAI_ROOT_DIR)bin/  
 MANAKAI_LIB_DIR = $(MANAKAI_ROOT_DIR)lib/  
   
 DIS_SUFFIX = .dis  
 DAEM_SUFFIX = .dafm  
 DAFX_SUFFIX = .dafx  
 PM_SUFFIX = .pm  
2    
3  CD = cd  CD = cd
4    CAT = cat
5  MKDIR = mkdir  MKDIR = mkdir
6  MAKE = make  MAKE = make
7  RM = rm  RM = rm
# Line 15  RMALL = $(RM) -fv Line 9  RMALL = $(RM) -fv
9  RMDIRALL = $(RMALL) -r  RMDIRALL = $(RMALL) -r
10  PERL = perl  PERL = perl
11  PERL_OPTIONS =  PERL_OPTIONS =
12  PERL_OPTIONS_ALL = $(PERL_OPTIONS) -I$(MANAKAI_LIB_DIR)  PERL_OPTIONS_ALL = $(PERL_OPTIONS)
13  PERL_ = $(PERL) $(PERL_OPTIONS_ALL)  PERL_ = $(PERL) $(PERL_OPTIONS_ALL)
14  PERLC = $(PERL) -c -w  PERLC = $(PERL) -c -w
15  PERLC_OPTIONS =  PERLC_OPTIONS =
16  PERLC_OPTIONS_ALL = $(PERLC_OPTIONS) -I$(MANAKAI_LIB_DIR)  PERLC_OPTIONS_ALL = $(PERLC_OPTIONS)
17  PERL_CHK = $(PERLC) $(PERLC_OPTIONS_ALL)  PERL_CHK = $(PERLC) $(PERLC_OPTIONS_ALL)
18  TOUCH = touch  TOUCH = touch
19  WGET = wget  WGET = wget
# Line 28  GREPV = $(GREP) -v Line 22  GREPV = $(GREP) -v
22  PERL_INPLACE = $(PERL_) -n -i  PERL_INPLACE = $(PERL_) -n -i
23  ECHO = echo  ECHO = echo
24  CP = cp  CP = cp
25    MV = mv
26    
27  ENC2XS_PATH = /usr/local/bin/  ENC2XS_PATH = /usr/local/bin/
28  ENC2XS = $(ENC2XS_PATH)enc2xs  ENC2XS = $(ENC2XS_PATH)enc2xs
29    
 NS_CHARSET = http://suika.fam.cx/~wakaba/archive/2005/manakai/Charset/  
   
 DIS_OPTIONS =  
 DIS_OPTIONS_ALL = $(DIS_OPTIONS) \  
       --search-path-catalog-file-name="$(MANAKAI_LIB_DIR)manakai/dis-catalog" \  
       --dis-file-suffix="$(DIS_SUFFIX)" \  
       --daem-file-suffix="$(DAEM_SUFFIX)" \  
       --dafx-file-suffix="$(DAFX_SUFFIX)"  
   
 DAF_OPTIONS =  
 DAF_PL = $(MANAKAI_BIN_DIR)daf.pl  
 DAF = $(PERL_) $(DAF_PL) $(DAF_OPTIONS) $(DIS_OPTIONS_ALL)  
   
30  TBR2TBL_PL = tbr2tbl.pl  TBR2TBL_PL = tbr2tbl.pl
31  TBR2TBL = $(PERL_) $(TBR2TBL_PL)  TBR2TBL = $(PERL_) $(TBR2TBL_PL)
32    
33  TBL2UCM_PL = tbl2ucm.pl  TBL2UCM_PL = tbl2ucm.pl
34  TBL2UCM = $(PERL_) $(TBL2UCM_PL)  TBL2UCM = $(PERL_) $(TBL2UCM_PL)
35    
 DIS_FILES = Encode$(DIS_SUFFIX)  
   
 PM_FILES = Encode$(PM_SUFFIX)  
   
36  GL_JIS_TBR_FILES = gl-jisx0208-common.tbr gl-cjk-hiragana.tbr \  GL_JIS_TBR_FILES = gl-jisx0208-common.tbr gl-cjk-hiragana.tbr \
37    gl-cjk-katakana.tbr gl-cjk-greek.tbr gl-cjk-cyrillic.tbr \    gl-cjk-katakana.tbr gl-cjk-greek.tbr gl-cjk-cyrillic.tbr \
38    gl-iso-646-alphanumeric.tbr gl-cjk-box-drawing.tbr    gl-iso-646-alphanumeric.tbr gl-cjk-box-drawing.tbr
# Line 69  TBL_FILES = $(GENERATED_TBR_FILES:.tbr=. Line 47  TBL_FILES = $(GENERATED_TBR_FILES:.tbr=.
47  UCM_FILES = $(GENERATED_TBR_FILES:.tbr=.ucm)  UCM_FILES = $(GENERATED_TBR_FILES:.tbr=.ucm)
48    
49  ENCODE_DIRECTORIES = \  ENCODE_DIRECTORIES = \
50    GLJIS1978 GLJIS1983 GLJIS1997 GLJIS1997Swapped EUCJP1997 ShiftJIS1997    GLJIS1978 GLJIS1983 GLJIS1997 GLJIS1997Swapped EUCJP1997 ShiftJIS1997 \
51      EUCJP1997OPENNEC EUCJPSW
52    
53  GENERATED_FILES = $(PM_FILES)  GENERATED_FILES = $(PM_FILES)
54    
55  all: $(PM_FILES) $(ENCODE_DIRECTORIES)  all: $(ENCODE_DIRECTORIES)
   
 $(PM_FILES): %$(PM_SUFFIX): %$(DIS_SUFFIX) $(DAF_PL)  
         $(DAF) --create-perl-module="$(NS_CHARSET)$* $@"  
         $(PERL_CHK) $@  
56    
57  $(TBR2TBL_PL):  $(TBR2TBL_PL):
58          $(WGET) http://suika.fam.cx/gate/cvs/*checkout*/perl/lib/Encode/Table/tool/tbr2tbl.pl          $(WGET) http://suika.fam.cx/gate/cvs/*checkout*/perl/lib/Encode/Table/tool/tbr2tbl.pl
# Line 397  euc-jp-1997.tbl: %.tbl: %.tbr \ Line 372  euc-jp-1997.tbl: %.tbl: %.tbr \
372    .euc-jp-1997-gr-left.tbr.tmp $(TBR2TBL_PL)    .euc-jp-1997-gr-left.tbr.tmp $(TBR2TBL_PL)
373          $(TBR2TBL) $< > $@          $(TBR2TBL) $< > $@
374    
375    euc-jp-1997-open-nec.tbl:
376            $(WGET) -O $@.tmp http://suika.fam.cx/gate/cvs/*checkout*/char/table/eucjp/euc-jp-1997-open-nec.tbl
377            $(ECHO) '#?PETBL/1.0 SOURCE' > $@
378            $(ECHO) '#?o name="euc-jp-1997-open-nec"' >> $@
379            $(ECHO) '#?o <-ucs-substition="0x30FB"' >> $@
380            $(ECHO) '#?o ucm:mb_cur_max="3"' >> $@
381            $(CAT) $@.tmp >> $@
382            $(RM) $@.tmp
383    
384    euc-jp-sw.tbl:
385            $(WGET) -O $@.tmp http://suika.fam.cx/gate/cvs/*checkout*/char/table/eucjp/euc-jp-sw.tbl
386            $(ECHO) '#?PETBL/1.0 SOURCE' > $@
387            $(ECHO) '#?o name="euc-jp-sw"' >> $@
388            $(ECHO) '#?o <-ucs-substition="0x30FB"' >> $@
389            $(ECHO) '#?o ucm:mb_cur_max="3"' >> $@
390            $(CAT) $@.tmp >> $@
391            $(RM) $@.tmp
392    
393  shift-jis-1997.tbl: %.tbl: %.tbr $(TBR2TBL_PL)  shift-jis-1997.tbl: %.tbl: %.tbr $(TBR2TBL_PL)
394          $(TBR2TBL) $< > $@          $(TBR2TBL) $< > $@
395    
# Line 408  shift-jis-1997.tbl: %.tbl: %.tbr $(TBR2T Line 401  shift-jis-1997.tbl: %.tbl: %.tbr $(TBR2T
401    
402  GLJIS1978 GLJIS1983 GLJIS1997: GLJIS%: gl-jis-%.ucm  GLJIS1978 GLJIS1983 GLJIS1997: GLJIS%: gl-jis-%.ucm
403          $(MKDIR) -p $@          $(MKDIR) -p $@
404          $(CD) $@ && $(ENC2XS) -M $@ ../$<          $(CP) $< $@/$<
405            $(CD) $@ && $(ENC2XS) -M $@ $<
406          $(CD) $@ && $(PERL_) ./Makefile.PL          $(CD) $@ && $(PERL_) ./Makefile.PL
407          $(CD) $@ && $(MAKE)          $(CD) $@ && $(MAKE) manifest dist
408  GLJIS1997Swapped: gl-jis-1997-swapped.ucm  GLJIS1997Swapped: gl-jis-1997-swapped.ucm
409          $(MKDIR) -p $@          $(MKDIR) -p $@
410          $(CD) $@ && $(ENC2XS) -M $@ ../$<          $(CP) $< $@/$<
411            $(CD) $@ && $(ENC2XS) -M $@ $<
412          $(CD) $@ && $(PERL_) ./Makefile.PL          $(CD) $@ && $(PERL_) ./Makefile.PL
413          $(CD) $@ && $(MAKE)          $(CD) $@ && $(MAKE) manifest dist
414  EUCJP1997: euc-jp-1997.ucm  EUCJP1997: euc-jp-1997.ucm
415          $(MKDIR) -p $@          $(MKDIR) -p $@
416          $(CD) $@ && $(ENC2XS) -M $@ ../$<          $(CP) $< $@/$<
417            $(CD) $@ && $(ENC2XS) -M $@ $<
418            $(CD) $@ && $(PERL_) -i -p -e 's/"0\.01"/"0.02"/' $@.pm
419            $(CD) $@ && $(PERL_) ./Makefile.PL
420            $(CD) $@ && $(MAKE) manifest dist
421    EUCJP1997OPENNEC: euc-jp-1997-open-nec.ucm
422            $(MKDIR) -p $@
423            $(CP) $< $@/$<
424            $(CD) $@ && $(ENC2XS) -M $@ $<
425          $(CD) $@ && $(PERL_) ./Makefile.PL          $(CD) $@ && $(PERL_) ./Makefile.PL
426          $(CD) $@ && $(MAKE)          $(CD) $@ && $(MAKE) manifest dist
427    EUCJPSW: euc-jp-sw.ucm
428            $(MKDIR) -p $@
429            $(CP) $< $@/$<
430            $(CD) $@ && $(ENC2XS) -M $@ $<
431            $(CD) $@ && $(PERL_) ./Makefile.PL
432            $(CD) $@ && $(MAKE) manifest dist
433  ShiftJIS1997: shift-jis-1997.ucm  ShiftJIS1997: shift-jis-1997.ucm
434          $(MKDIR) -p $@          $(MKDIR) -p $@
435          $(CD) $@ && $(ENC2XS) -M $@ ../$<          $(CP) $< $@/$<
436            $(CD) $@ && $(ENC2XS) -M $@ $<
437          $(CD) $@ && $(PERL_) ./Makefile.PL          $(CD) $@ && $(PERL_) ./Makefile.PL
438          $(CD) $@ && $(MAKE)          $(CD) $@ && $(MAKE) manifest dist
   
 install-GLJIS1978 install-GLJIS1983 install-GLJIS1997 install-GLJIS1997Swapped \  
   install-EUCJP1997 install-ShiftJIS1997: install-%: %  
         $(CD) $< && $(MAKE) install  
   
 install: install-GLJIS1978 install-GLJIS1983 install-GLJIS1997 \  
   install-GLJIS1997Swapped \  
   install-EUCJP1997 install-ShiftJIS1997  
439    
440  clean:  release-update:
441            $(MV) GLJIS1978/Encode-GLJIS1978-0.01.tar.gz ./
442            $(MV) GLJIS1983/Encode-GLJIS1983-0.01.tar.gz ./
443            $(MV) GLJIS1997/Encode-GLJIS1997-0.01.tar.gz ./
444            $(MV) GLJIS1997Swapped/Encode-GLJIS1997Swapped-0.01.tar.gz ./
445            $(MV) EUCJP1997/Encode-EUCJP1997-0.02.tar.gz ./
446            $(MV) EUCJP1997/Encode-EUCJP1997OPENNEC-0.01.tar.gz ./
447            $(MV) EUCJP1997/Encode-EUCJPSW-0.01.tar.gz ./
448            $(MV) ShiftJIS1997/Encode-ShiftJIS1997-0.01.tar.gz ./
449    
450    clean-GLJIS1978 clean-GLJIS1983 clean-GLJIS1997 clean-GLJIS1997Swapped \
451      clean-EUCJP1997 clean-EUCJP1997OPENNEC clean-EUCJPSW \
452      clean-ShiftJIS1997: clean-%: %
453            $(CD) $< && $(MAKE) clean
454    
455    clean: clean-GLJIS1978 clean-GLJIS1983 clean-GLJIS1997 \
456      clean-GLJIS1997Swapped \
457      clean-EUCJP1997 clean-EUCJP1997OPENNEC clean-EUCJPSW clean-ShiftJIS1997
458          $(RMALL) $(GENERATED_FILES)          $(RMALL) $(GENERATED_FILES)
459          $(RMALL) .*.tmp *~ .*~ *.BAK .*.BAK          $(RMALL) .*.tmp *~ .*~ *.BAK .*.BAK
460          $(RMALL) $(TBR2TBL_PL) $(TBL2UCM_PL)          $(RMALL) $(TBR2TBL_PL) $(TBL2UCM_PL)
461          $(RMALL) $(TBR_FILES) $(TBL_FILES) $(UCM_FILES)          $(RMALL) $(TBR_FILES) $(TBL_FILES) $(UCM_FILES)
         $(RMDIRALL) $(ENCODE_DIRECTORIES)  
462    
463  clean-db:  clean-subdirectories:
464          $(RMALL) *$(DAEM_SUFFIX) *$(DAFX_SUFFIX)          $(RMDIRALL) $(ENCODE_DIRECTORIES)
465    
466  distclean: clean clean-db  distclean: clean-subdirectories
467            $(RMALL) $(GENERATED_FILES)
468            $(RMALL) .*.tmp *~ .*~ *.BAK .*.BAK
469            $(RMALL) $(TBR2TBL_PL) $(TBL2UCM_PL)
470            $(RMALL) $(TBR_FILES) $(TBL_FILES) $(UCM_FILES)
471    
472  ## $Date$  ## $Date$
473  ## License: Public Domain.  ## License: Public Domain.

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24