Changeset b547aa4 for Makefile.in


Ignore:
Timestamp:
Mar 19, 2007, 2:14:33 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
836e6263
Parents:
925faae
git-author:
Nelson Elhage <nelhage@mit.edu> (03/19/07 13:32:25)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/19/07 14:14:33)
Message:
Modifying the makefile to build and install perl modules
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    ra956288 rb547aa4  
    3131
    3232EXE = barnowl
     33PERL_MODULES = Jabber
     34MODULE_DIRS = $(PERL_MODULES:%=perl/modules/%)
    3335
    3436BASE_OBJS = $(BASE_SRCS:.c=.o)
     
    5759        ./tester reg
    5860
    59 clean: libfaimclean
     61clean: libfaimclean modules_clean
    6062        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
    6163
    6264distclean: clean libfaimdistclean
    6365        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
     66
     67.PHONY: $(MODULE_DIRS)
     68
     69modules: $(MODULE_DIRS)
     70modules_clean:
     71        for i in $(MODULE_DIRS); do \
     72                cd $$i; test ! -f Makefile || make clean; \
     73        done
     74
     75$(MODULE_DIRS): %: %/Makefile
     76        ( cd $@ && make $(notdir $@).par )
     77
     78$(MODULE_DIRS:=/Makefile): %/Makefile: %/Makefile.PL
     79        ( cd $(dir $@) && perl -I../../lib Makefile.PL )
    6480
    6581proto: owl_prototypes.h
     
    104120        (cd libfaim; $(MAKE) distclean)
    105121
    106 all: $(EXE)
     122all: $(EXE) $(MODULE_DIRS)
    107123
    108124install: all installdirs
    109125        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
    110126        ${INSTALL_DATA} doc/owl.1 ${DESTDIR}${mandir}/man1/barnowl.1
    111         tar -C perl -c . | tar -C ${DESTDIR}${datadir} -x
     127        ${INSTALL} -d ${DESTDIR}${datadir}/lib
     128        tar -C perl/lib -c . | tar -C ${DESTDIR}${datadir}/lib -x
     129        for i in $(PERL_MODULES); do \
     130                ${INSTALL_DATA} perl/modules/$$i/$$i.par ${DESTDIR}${datadir}/modules; \
     131        done
    112132
    113133installdirs: mkinstalldirs
Note: See TracChangeset for help on using the changeset viewer.