I can pretty much just add modules to the vendor directory and it picks it up.PWD = $(shell pwd) CACHE_DIR ?= cache PERL = $(shell which perl) BUILD_INCS = -I $(PWD)/$(CACHE_DIR)/lib/perl5 INSTALL_TARGET ?= $(PWD)/$(CACHE_DIR) MAKEFILE_PL_ARGS = INSTALL_BASE=$(INSTALL_TARGET) PERL="$(PERL) $(BUIL +D_INCS)" TGZFILES = $(wildcard *.tar.gz) DEPENDS_ORDER2 = $(shell cat install_order) $(TGZFILES) # remove duplicates DEPENDS_ORDER = $(shell perl -e '@b=grep{!$$s{$$_}++} @ARGV;print "@b" +' $(DEPENDS_ORDER2)) # this gets a list of all the directories that the .tar.gz files unpac +k into UNPACK_DIRS = $(shell for t in $(DEPENDS_ORDER);do for f in `tar tzf $ +$t`;do R="$$R $$f/";break;done;done;echo $$R) BLIBS = $(patsubst %/,%/blib,$(UNPACK_DIRS)) # we want to link to gmake here, unless it is not available GMAKE = $(firstword $(shell which gmake) $(shell which $(MAKE)) ) PATH = $(PWD)/bin:$(shell echo $$PATH) .PHONY: all clean install $(TGZFILES) all: @ echo ------------------------------------------- @ echo "TGZFILES: $(TGZFILES)" @ echo ------------------------------------------- @ echo "DEPENDS_ORDER: $(DEPENDS_ORDER)" @ echo ------------------------------------------- @ echo "UNPACK_DIRS: $(UNPACK_DIRS)" @ echo ------------------------------------------- @ echo "BLIBS: $(BLIBS)" @ echo ------------------------------------------- @ echo "BUILD_INCS: $(BUILD_INCS)" @ echo ------------------------------------------- $(UNPACK_DIRS): @ echo unpacking $@ @ echo -n " " tar xfz $(@).tar.gz @ for patch_file in patches/*.$(@).tar.gz.*.patch; do \ if [ ! -e $$patch_file ]; then \ echo " No patches found for $(@).tar.gz"; \ continue; \ fi; \ echo " Running patch $$patch_file: "; \ patch -p1 < $$patch_file; \ done; @ echo " Making makefile $@ in $@"; @ cd $@ && TipTop=1 PERL_MM_USE_DEFAULT=1 perl $(BUILD_INCS) Makef +ile.PL $(MAKEFILE_PL_ARGS) >> build.log; @ echo " Making blib $@ in $@"; @ $(MAKE) -C $@ all >>build.log # ARCH=1 is to override BSDPAN (hateful software) @ echo " Installing $(@) into $(INSTALL_TARGET)" @ $(MAKE) -C $@ pure_install ARCH=1 >> build.log # force the use of gmake by putting it first in the path ENV: rm -rf bin/make ln -sf $(GMAKE) bin/make $(CACHE_DIR): ENV $(UNPACK_DIRS) install: $(CACHE_DIR) @ echo "Copying $(CACHE_DIR) to $(TARGET)"; mkdir -p $(TARGET)/ cp -Rf $(CACHE_DIR)/lib/perl5/* $(TARGET)/ @ touch $(CACHE_DIR) clean: rm -rf $(UNPACK_DIRS) rm -rf $(CACHE_DIR) rm -f ./build.log
$(MAKE) -C $(VENDOR_DIR) install TARGET=$(LOCAL_BUILD_TARGET)/lib/
In reply to Re: Installing a group of .tar.gz format perl modules
by thinc
in thread Installing a group of .tar.gz format perl modules
by duncs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |