diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-28 22:32:43 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-05-28 22:32:43 -0400 |
commit | f6e0e953209abb322b1d44e6d04e88c2230d9111 (patch) | |
tree | 4b6ee08f46d745a780abaeed90580d253c3a3eb6 /Makefile | |
parent | 1c66a0f89838fe33e74a8409dd1b8f6b6208fd52 (diff) |
work more
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 52 |
1 files changed, 32 insertions, 20 deletions
@@ -1,9 +1,11 @@ top := $(shell pwd) export maven_dist_top := $(top) +export makefiles := $(top)/makefiles mvn_ver = $(shell cat conf_apache-maven_version.txt) -MAVEN_LOCAL_REPO = $(shell cat conf_maven.local.repo.txt) -export MAVEN_LOCAL_REPO +MAVEN_LOCAL_REPO_INSTALL = $(shell cat conf_maven.local.repo.txt) +MAVEN_LOCAL_REPO_SEARCH = $(top)/packages/dest/$(MAVEN_LOCAL_REPO_INSTALL) +export MAVEN_LOCAL_REPO_INSTALL MAVEN_LOCAL_REPO_SEARCH all: extract gen_version-maven-svn.txt @@ -41,6 +43,7 @@ extract: \ package: \ packages/plexus-utils \ packages/plexus-interpolation \ + packages/plexus-classworlds \ packages/plexus-containers \ token_%: @@ -61,34 +64,31 @@ build/maven: upstream/apache-maven-${mvn_ver} rm -rf $@ mkdir -p $@ lndir -silent "${top}/$<" "${top}/$@" +#### -# maven-svn #################################################################### - -upstream/maven-svn: conf_maven-svn_map.txt token_network +upstream/apache-svn: conf_apache-svn_map.txt token_network if ! [[ -d "$@/.svn" ]]; then \ mkdir -p ${@D} && \ - svn checkout --depth=empty https://svn.apache.org/repos/asf/maven "$@"; \ + svn checkout --depth=empty https://svn.apache.org/repos/asf "$@"; \ else \ cd "$@" && svn update; \ fi cd "$@" && \ - while read svnpath localpath; do \ + while read svnpath buildpath; do \ svn update --parents "$$svnpath"; \ done <"${top}/$<" touch $@ -gen_version-maven-svn.txt: upstream/maven-svn conf_maven-svn_map.txt - while read svnpath localpath; do \ - cd "${top}/$</$${svnpath}" && \ - LC_ALL=C svn log -l 1 .|sed -n 2p; \ - done <"${top}/conf_maven-svn_map.txt" | \ - cut -d'|' -f3 | date --file=- --utc --iso-8601 | sort | sed -n '$$p' > "${top}/$@" -build/maven-extras: upstream/maven-svn conf_maven-svn_map.txt + +$(addprefix build/,$(shell awk '{ print $$2 }' < conf_apache-svn_map.txt)): \ +build/%: upstream/apache-svn conf_apache-svn_map.txt rm -rf $@ mkdir -p $@ - while read svnpath localpath; do \ - mkdir -p "${top}/$@/$${localpath}" && \ - lndir -silent "${top}/$</$${svnpath}" "${top}/$@/$${localpath}"; \ - done <conf_maven-svn_map.txt + lndir -silent "${top}/$</$(shell sed -n 's|\s*\s$(subst .,\.,$*)$$||p' conf_apache-svn_map.txt)" "${top}/$@" + if [ -d patches/$* ]; then \ + for patch in patches/$*/*; do \ + patch -Np1 -i $$patch $@; \ + done \ + fi # git wildcard ################################################################# @@ -99,11 +99,21 @@ build/%: upstream/%-git rm -rf $@ mkdir -p $@ lndir -silent "${top}/$<" "${top}/$@" + if [ -d patches/$* ]; then \ + for patch in patches/$*/*; do \ + patch -Np1 -i $$patch $@ \ + done \ + fi ################################################################################ -packages/%: build/% makefiles/%.mk - $(MAKE) -C build/$* -f $(top)/makefiles/$*.mk install DESTDIR="$(top)/$@" +$(patsubst makefiles/%.mk,packages/%,$(wildcard makefiles/*.mk)): \ +packages/%: RECURSIVE build/% makefiles/%.mk + $(MAKE) -C build/$* -f "$(top)/makefiles/$*.mk" install DESTDIR="$(top)/$@" + mkdir -p packages/dest && lndir -silent "$(top)/$@" packages/dest + +packages/%: RECURSIVE build/% makefiles/mvn-simple.mk + $(MAKE) -C build/$* -f "$(top)/makefiles/mvn-simple.mk" install DESTDIR="$(top)/$@" mkdir -p packages/dest && lndir -silent "$(top)/$@" packages/dest packages/plexus-containers: packages/plexus-utils packages/plexus-classworlds @@ -111,3 +121,5 @@ packages/plexus-containers: packages/plexus-utils packages/plexus-classworlds distclean: rm -rf upstream build packatges rm -f token_* gen_* + +.PHONY: RECURSIVE |