summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-05-29 18:34:46 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-05-29 18:34:46 -0400
commit2a92c8ff365993d2491440982747e0c139c9416a (patch)
tree4c405a7de66ff281208312867ef287f9d31de16b
parentae087393a688f69e0788a075760d4260a18388dc (diff)
do away with MAVEN_REPO_SEARCH
-rw-r--r--Makefile4
-rw-r--r--makefiles/mvn-simple.mk11
2 files changed, 7 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 9205e78..8e2d008 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,9 @@
top := $(shell pwd)
-export MAVEN_LOCAL_REPO_INSTALL = $(shell cat conf/maven.local.repo.txt)
-export MAVEN_LOCAL_REPO_SEARCH = $(top)/build/packages/dest/$(MAVEN_LOCAL_REPO_INSTALL)
-
all: package
packages := $(filter-out _%,$(shell sed "s/[\# ].*//" conf/sources.mk))
include conf/sources.mk
+export MAVEN_LOCAL_REPO := $(shell cat conf/maven.local.repo.txt)
# download #####################################################################
diff --git a/makefiles/mvn-simple.mk b/makefiles/mvn-simple.mk
index c7e41ce..5bf8254 100644
--- a/makefiles/mvn-simple.mk
+++ b/makefiles/mvn-simple.mk
@@ -2,8 +2,7 @@
# Install paths
DESTDIR ?=
-MAVEN_LOCAL_REPO_INSTALL ?= ~/.m2
-MAVEN_LOCAL_REPO_SEARCH ?= ~/.m2
+MAVEN_LOCAL_REPO ?= ~/.m2
# Utilities
XMLSTARLET = xml
@@ -22,12 +21,14 @@ mvn_subdirs := $(patsubst %/pom.xml,%,$(wildcard */pom.xml))
subdirs := $(if $(subdirs),$(filter $(mvn_subdirs),$(subdirs)),$(mvn_subdirs))
targets := pom $(if $(wildcard src/main/),jar)
-####
+################################################################################
jar_add_dir = $(foreach file,$(wildcard $1/*), -C $1 $(patsubst $1/%,%,$(file)) )
dep_dir = $1 $(shell $(FIND) $1)
dep_optdir = $(shell $(FIND) $1 2>/dev/null)
+# all
+
all: PHONY \
$(addprefix target/$(artifact)-$(version).,$(targets)) \
$(addsuffix /all,$(subdirs))
@@ -63,10 +64,10 @@ target/classes: $(call dep_optdir,src/main/java)
# install
install: PHONY \
- $(addprefix $(DESTDIR)$(MAVEN_LOCAL_REPO_INSTALL)/$(subst .,/,$(group))/$(artifact)/$(version)/$(artifact)-$(version).,$(targets)) \
+ $(addprefix $(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)/$(artifact)-$(version).,$(targets)) \
$(addsuffix /install,$(subdirs))
-$(DESTDIR)$(MAVEN_LOCAL_REPO_INSTALL)/$(subst .,/,$(group))/$(artifact)/$(version)/%: target/%
+$(DESTDIR)$(MAVEN_LOCAL_REPO)/$(subst .,/,$(group))/$(artifact)/$(version)/%: target/%
$(INSTALL) -Dm644 $< $@
# clean