Annotation of db/prgsrc/Makefile, revision 1.34

1.6       boris       1: ifndef ROOT
                      2: ROOT = /home/znatoki
                      3: endif
1.1       boris       4: PERL = perl
                      5: TMPSAV = /tmp
                      6: PMODE = 775
                      7: LMODE = 664
1.7       boris       8: KULICHKI=znatoki.kulichki.net
1.4       boris       9: RSYNC = rsync -ruvpte ssh --delete --progress --rsync-path='~/bin/rsync'
1.16      boris      10: SCP=scp
1.5       boris      11: DESTSRCDIR=~piataev/public_html/dimrub/src/
1.23      roma7      12: SRCDIR=../baza
1.5       boris      13: DESTPRGSRC=~piataev/db/prgsrc
1.1       boris      14: DUMPDIR=../dump
1.17      boris      15: DESTDUMPDIR=/var/tmp/
1.33      boris      16: TABLES= Questions Tournaments word2question nf nests Authors A2Q
1.31      roma7      17: INDEXWRITER= rubash@hotbox.ru, roma7@zaba.ru
1.34    ! boris      18: #INDEXWRITER= boris
        !            19: AUTHORCHECKER = roma7@zaba.ru
        !            20: #AUTHORCHECKER = boris
        !            21: DELIVERER = roma7@zaba.ru, boris
        !            22: DELIVERER = boris
        !            23: UPDATELOG = $(DUMPDIR)/update.log
        !            24: UAUTHORS=$(DUMPDIR)/uauthors
        !            25: UNSORTED=$(DUMPDIR)/unsorted
        !            26: 
1.1       boris      27: 
                     28: DBSCRIPTS = mkdb.pl \
                     29:            updatem.pl \
                     30:            updatedb.pl \
                     31:            changecities.pl\
                     32:            createindex.pl\
                     33:            updateindex.pl \
1.8       boris      34:            addlinks.pl \
1.9       boris      35:            deletefiles.pl\
1.10      boris      36:            renamefile.pl \
1.11      boris      37:            makecheck.pl\
                     38:            mkRS.pl\
1.14      boris      39:            delRS.pl\
1.11      boris      40:            updateRS.pl\
                     41:            updateRS1.pl\
1.15      boris      42:            updateRS2.pl\
                     43:            updateRS3.pl\
1.11      boris      44:            dumpRS.pl\
                     45:            dumpin2out.pl\
                     46:            dump2dump.pl\
                     47:            checkPBS.pl\
1.34    ! boris      48:            loaddump.pl \
        !            49:            makeauthors.pl
1.11      boris      50: 
                     51: LIBS = chgkfiles.pm \
1.10      boris      52:            common.pl\
                     53:            chgk.cnf\
1.11      boris      54:            dbchgk.pm\
                     55:             check.pl
1.10      boris      56: 
1.1       boris      57: 
                     58: CGISCRIPTS = db.cgi
                     59: 
1.12      boris      60: 
                     61: HTMLS = contribute.html \
                     62:        copyright.html \
                     63:        copyright_mozg.html \
                     64:        credits.html \
                     65:        dbmain.html \
                     66:        footer.html \
                     67:        guestbook.html \
                     68:        index.html \
                     69:        random.html \
                     70:        reklama.html \
                     71:        search.html  
                     72: 
                     73: 
1.19      roma7      74: TEXTS = $(SRCDIR)/*.txt
1.12      boris      75: 
1.13      boris      76: 
1.1       boris      77: DBBIN = ../bin
                     78: MANDIR = ../man
1.10      boris      79: LIBDIR = ../lib
1.6       boris      80: CGIBIN = $(ROOT)/public_html/cgi-bin
1.13      boris      81: HTMLDIR = $(ROOT)/public_html/dimrub/db
1.1       boris      82: 
1.10      boris      83: BININSTALL =    ${DBSCRIPTS:%=$(DBBIN)/%}
1.1       boris      84: CGIINSTALL =    ${CGISCRIPTS:%.cgi=$(CGIBIN)/%.cgi}
1.10      boris      85: LIBINSTALL =    ${LIBS:%=$(LIBDIR)/%}
1.13      boris      86: HTMLINSTALL =   ${HTMLS:%.html=$(HTMLDIR)/%.html}
1.10      boris      87: 
1.13      boris      88: all: $(LIBINSTALL) $(BININSTALL) $(CGIINSTALL) $(HTMLINSTALL)
1.1       boris      89: 
                     90: 
1.11      boris      91: $(DBBIN)/%.pl:       %.pl
1.1       boris      92:        ${PERL} -c $<
                     93:        - pod2man --center "Internet Club DB" $< > $*.1
                     94:        - install -m $(LMODE) $*.1 $(MANDIR)/man1
1.10      boris      95:        - rm $*.1
1.1       boris      96:        if [ -f $@ ]; then mv $@ $(TMPSAV); fi
                     97:        cp $< $@
                     98:        chmod $(PMODE) $@
                     99:        if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
1.33      boris     100: 
1.1       boris     101: $(CGIBIN)/%.cgi:       %.cgi
                    102:        ${PERL} -c $<
                    103:        - pod2man --center "Internet Club DB" $< > $*.1
                    104:        - install -m $(LMODE) $*.1 $(MANDIR)/man1
1.10      boris     105:        - rm $*.1       
1.1       boris     106:        if [ -f $@ ]; then mv $@ $(TMPSAV); fi
                    107:        cp $< $@
                    108:        chmod $(PMODE) $@
                    109:        if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
                    110: 
                    111: 
1.10      boris     112: 
                    113: $(LIBDIR)/%.pm:       %.pm
                    114:        ${PERL} -c $<
                    115:        - pod2man --center "Internet Club DB" $< > $*.3
                    116:        - install -m $(LMODE) $*.3 $(MANDIR)/man3
                    117:        - rm $*.3
1.11      boris     118:        if [ -f $@ ]; then mv $@ $(TMPSAV); fi
                    119:        cp $< $@
                    120:        chmod $(LMODE) $@
                    121:        if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
                    122: 
                    123: 
                    124: $(LIBDIR)/%.pl:       %.pl
                    125:        ${PERL} -c $<
                    126:        - pod2man --center "Internet Club DB" $< > $*.3
                    127:        - install -m $(LMODE) $*.3 $(MANDIR)/man3
                    128:        - rm $*.3
                    129:        if [ -f $@ ]; then mv $@ $(TMPSAV); fi
                    130:        cp $< $@
                    131:        chmod $(LMODE) $@
                    132:        if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
                    133: 
                    134: 
                    135: $(LIBDIR)/%.cnf:       %.cnf
                    136:        ${PERL} -c $<
                    137:        - pod2man --center "Internet Club DB" $< > $*.5
                    138:        - install -m $(LMODE) $*.5 $(MANDIR)/man5
                    139:        - rm $*.5
1.10      boris     140:        if [ -f $@ ]; then mv $@ $(TMPSAV); fi
                    141:        cp $< $@
                    142:        chmod $(LMODE) $@
                    143:        if [ -f $(TMPSAV)/$(@F) ]; then rm -f $(TMPSAV)/$(@F); fi
                    144: 
                    145: 
1.12      boris     146: $(HTMLDIR)/%.html:       %.html
                    147:        cp $< $@
                    148: 
1.10      boris     149: 
1.19      roma7     150: $(UNSORTED): TEXTS
1.10      boris     151: 
1.19      roma7     152: $(SRCDIR)/%.txt:
                    153:        updatedb $<
1.1       boris     154: 
                    155: srcdeliver:
                    156:        $(RSYNC) $(SRCDIR) $(KULICHKI):$(DESTSRCDIR)
                    157: 
                    158: 
                    159: prgdeliver:
                    160:        $(RSYNC) ./ $(KULICHKI):$(DESTPRGSRC)
                    161: 
                    162: dbdeliver:
1.16      boris     163:        mysqldump --add-drop-table -u piataev chgk $(TABLES)  > $(DUMPDIR)/chgkdump.0
                    164:        sed 's/TYPE=ISAM PACK_KEYS=1//g' $(DUMPDIR)/chgkdump.0 > $(DUMPDIR)/chgkdump
                    165:        gzip $(DUMPDIR)/chgkdump
1.18      boris     166:        rm $(DUMPDIR)/chgkdump.0
1.16      boris     167:        $(SCP) $(DUMPDIR)/chgkdump.gz  $(KULICHKI):$(DESTDUMPDIR)
1.12      boris     168: 
1.24      roma7     169: update: 
1.21      roma7     170:        cvs update $(SRCDIR)
1.27      roma7     171:        mysql -upiataev chgk <delq.sql
1.33      boris     172:        ${PERL} $(DBBIN)/mkdb.pl
                    173:        ${PERL} $(DBBIN)/updateindex.pl -i$(SRCDIR)/index
1.34    ! boris     174:        ${PERL} $(DBBIN)/updatedb.pl $(SRCDIR)/*.txt 2>&1 | tee $(UPDATELOG)
1.33      boris     175:        ${PERL} $(DBBIN)/makeauthors.pl
1.34    ! boris     176:        if [ -s $(UAUTHORS) ]; then  \
        !           177:                mail -sUauthors $(AUTHORCHECKER) < $(UAUTHORS); \
        !           178:        fi
        !           179:        if [ -s $(UNSORTED) ]; then \
        !           180:                mail -sUnsorted $(INDEXWRITER) <$(UNSORTED);\
        !           181:         else \
        !           182:                 $(PERL) $(DBBIN)/mkRS.pl; \
        !           183:                $(PERL) $(DBBIN)/updateRS2.pl 2000 50;\
        !           184:                mail -s"Ready to deliver" $(DELIVERER);\
        !           185:         fi
1.33      boris     186: 
                    187: authorsdeliver:
                    188:        mysqldump --add-drop-table -u piataev chgk Authors A2Q  > $(DUMPDIR)/chgkdump.0
                    189:        sed 's/TYPE=ISAM PACK_KEYS=1//g' $(DUMPDIR)/chgkdump.0 > $(DUMPDIR)/chgkdump
                    190:        gzip $(DUMPDIR)/chgkdump
                    191:        rm $(DUMPDIR)/chgkdump.0
                    192:        $(SCP) $(DUMPDIR)/chgkdump.gz  $(KULICHKI):$(DESTDUMPDIR)
                    193: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>