/[papo]/papo/zot/Makefile
ViewVC logotype

Diff of /papo/zot/Makefile

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

revision 1.5 by jlenton, Fri May 16 16:52:21 2003 UTC revision 1.6 by styxman, Wed Jun 4 19:00:27 2003 UTC
# Line 2  Line 2 
2  #  #
3  # zot/ Makefile -- I hope I got the magic right :)  # zot/ Makefile -- I hope I got the magic right :)
4    
5  ZOTFILE=PAPO-ER.zot  ZOT=zot2dot.pl zot2sql.pl
6  ZOT2SQL=/path/to/zot2sql  ZOTMODS=zot.pm Zot.pm
7    ZOTSUBDIRS=DBD Zot
8    
9  LIBDIR=${HOME}/public_perl  LIBDIR=${HOME}/public_perl
10  FILES=zot.pm Zot.pm  
11  DIRS=DBD Zot  INSTALL=ln -sf
12    
13    # $(call do-for-all,func,list)
14    do-for-all=$(foreach item,$(2),$(call $(1),$(item)))
15    # do-for-all=for i in $(2); do $(call $(1),$$i); done
16    
17    # the ';'s are important to let the do-for-all func work
18    install-bin=${INSTALL} ${PWD}/$(1) ~/bin/$(subst .pl,,$(1));
19    install-mod=${INSTALL} ${PWD}/$(1) ${LIBDIR}/$(1);
20    install-subdir=${install-mod}
21    
22  all:  all:
23          @exit "Don't call me!";false          @exit "Don't call me!";false
# Line 39  remakedb: .dropdb .createdb .initdb $(ZO Line 49  remakedb: .dropdb .createdb .initdb $(ZO
49          createdb --host=$(DB_HOST) --username=$(DB_USER) $(DB_NAME)          createdb --host=$(DB_HOST) --username=$(DB_USER) $(DB_NAME)
50          touch .createdb          touch .createdb
51    
52  install: install-binaries install-modules  install: install-zot
53    
54  install-binaries:  install-zot:
55          for i in *.pl; do \          $(call do-for-all,install-bin,${ZOT})
56              cp -f $$i ~/bin/$${i%.pl}; \          $(call do-for-all,install-mod,${ZOTMODS})
57          done;          $(call do-for-all,install-subdir,${ZOTSUBDIRS})
   
 install-modules:  
         mkdir -p ${LIBDIR};  
         for i in ${FILES}; do \  
             cp -f $$i ${LIBDIR}; \  
         done;  
         for i in ${DIRS}; do \  
             mkdir -p ${LIBDIR}/$$i; \  
             cp -f $$i/*.pm ${LIBDIR}/$$i; \  
         done;  

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

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26