From b31ab335abac398caa7152020e5589d8fa817c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 28 Jun 2011 11:01:57 +0200 Subject: jinterface: Use otp_subdir.mk instead of homebrewed solution There once was a reason to have a "Makefile.otp" makefile, but it doesn't apply any longer. Rename it to "Makefile" so that the standard otp_subdir.mk file can be used for recursion into sub directories. --- lib/jinterface/java_src/Makefile | 16 +-- .../java_src/com/ericsson/otp/erlang/Makefile | 113 +++++++++++++++++++++ .../java_src/com/ericsson/otp/erlang/Makefile.otp | 113 --------------------- 3 files changed, 115 insertions(+), 127 deletions(-) create mode 100644 lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile delete mode 100644 lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile.otp (limited to 'lib') diff --git a/lib/jinterface/java_src/Makefile b/lib/jinterface/java_src/Makefile index 755ef46a8b..19f99831eb 100644 --- a/lib/jinterface/java_src/Makefile +++ b/lib/jinterface/java_src/Makefile @@ -29,9 +29,7 @@ VSN=$(JINTERFACE_VSN) # Common Macros # ---------------------------------------------------- -# call recursive make explicitly below -# due to separate makefiles for Ronja & OTP -# SUB_DIRECTORIES = com/ericsson/otp/erlang +SUB_DIRECTORIES = com/ericsson/otp/erlang SPECIAL_TARGETS = @@ -51,15 +49,5 @@ POM_SRC= $(POM_FILE).src $(POM_TARGET): $(POM_SRC) ../vsn.mk sed -e 's;%VSN%;$(VSN);' $< > $@ -# ---------------------------------------------------- -# Default Subdir Targets -# ---------------------------------------------------- - -.PHONY: debug opt instr release docs release_docs tests release_tests clean depend - -debug opt instr release docs release_docs tests release_tests clean depend: $(TARGET_FILES) - set -e; set -x; \ - case "$(MAKE)" in *clearmake*) tflag="-T";; *) tflag="";; esac; \ - if test -f com/ericsson/otp/erlang/ignore_config_record.inf; then xflag=$$tflag; fi; \ - (cd com/ericsson/otp/erlang && $(MAKE) -f Makefile.otp $$xflag $@) +include $(ERL_TOP)/make/otp_subdir.mk diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile new file mode 100644 index 0000000000..e772a2b0a5 --- /dev/null +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile @@ -0,0 +1,113 @@ +# -*-Makefile-*- + +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2000-2009. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# +include $(ERL_TOP)/make/target.mk + +JAVA_DEST_ROOT = $(ERL_TOP)/lib/jinterface/priv/ +JAVA_SRC_ROOT = $(ERL_TOP)/lib/jinterface/java_src/ +JAVA_CLASS_SUBDIR = com/ericsson/otp/erlang/ + +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Application version +# ---------------------------------------------------- +include $(ERL_TOP)/lib/jinterface/vsn.mk +VSN=$(JINTERFACE_VSN) + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/lib/jinterface-$(VSN) + +# +# JAVA macros +# + +# don't add filenames to the Makefile! +# all java sourcefiles listed in common include file +include $(ERL_TOP)/lib/jinterface/java_src/$(JAVA_CLASS_SUBDIR)/java_files + +TARGET_FILES= $(JAVA_FILES:%=$(JAVA_DEST_ROOT)$(JAVA_CLASS_SUBDIR)%.class) +JAVA_SRC= $(JAVA_FILES:%=%.java) + +JARFILE= OtpErlang.jar + + +# ---------------------------------------------------- +# Programs and Flags +# ---------------------------------------------------- + +JAR= jar + +CLASSPATH = $(JAVA_SRC_ROOT) + +JAVADOCFLAGS=-d $(DOCDIR) +JAVAFLAGS=-d $(JAVA_DEST_ROOT) +JARFLAGS=-cvf + +JAVA_OPTIONS = + +ifeq ($(TESTROOT),) +RELEASE_PATH=$(ERL_TOP)/release/$(TARGET) +else +RELEASE_PATH=$(TESTROOT) +endif + + +# ---------------------------------------------------- +# Make Rules +# ---------------------------------------------------- + +debug opt: make_dirs $(JAVA_DEST_ROOT)$(JARFILE) + +make_dirs: + if [ ! -d "$(JAVA_DEST_ROOT)" ];then mkdir "$(JAVA_DEST_ROOT)"; fi + +$(JAVA_DEST_ROOT)$(JARFILE): $(TARGET_FILES) + @(cd $(JAVA_DEST_ROOT) ; $(JAR) $(JARFLAGS) $(JARFILE) $(JAVA_CLASS_SUBDIR)) + +clean: + rm -f $(TARGET_FILES) *~ + +docs: + +# ---------------------------------------------------- +# Release Targets +# ---------------------------------------------------- + +# include $(ERL_TOP)/make/otp_release_targets.mk + +release release_docs release_tests release_html: + $(MAKE) $(MFLAGS) RELEASE_PATH=$(RELEASE_PATH) $(TARGET_MAKEFILE) $@_spec + +release_spec: opt + $(INSTALL_DIR) $(RELSYSDIR)/java_src/com/ericsson/otp/erlang + $(INSTALL_DATA) $(JAVA_SRC) $(RELSYSDIR)/java_src/com/ericsson/otp/erlang + $(INSTALL_DIR) $(RELSYSDIR)/priv + $(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) $(RELSYSDIR)/priv + +release_docs_spec: + + + + +# ---------------------------------------------------- + diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile.otp b/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile.otp deleted file mode 100644 index d0ff9cda34..0000000000 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/Makefile.otp +++ /dev/null @@ -1,113 +0,0 @@ -# -*-Makefile-*- - -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 2000-2009. All Rights Reserved. -# -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. -# -# %CopyrightEnd% -# -include $(ERL_TOP)/make/target.mk - -JAVA_DEST_ROOT = $(ERL_TOP)/lib/jinterface/priv/ -JAVA_SRC_ROOT = $(ERL_TOP)/lib/jinterface/java_src/ -JAVA_CLASS_SUBDIR = com/ericsson/otp/erlang/ - -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include $(ERL_TOP)/lib/jinterface/vsn.mk -VSN=$(JINTERFACE_VSN) - -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/jinterface-$(VSN) - -# -# JAVA macros -# - -# don't add filenames to the Makefile! -# all java sourcefiles listed in common include file -include $(ERL_TOP)/lib/jinterface/java_src/$(JAVA_CLASS_SUBDIR)/java_files - -TARGET_FILES= $(JAVA_FILES:%=$(JAVA_DEST_ROOT)$(JAVA_CLASS_SUBDIR)%.class) -JAVA_SRC= $(JAVA_FILES:%=%.java) - -JARFILE= OtpErlang.jar - - -# ---------------------------------------------------- -# Programs and Flags -# ---------------------------------------------------- - -JAR= jar - -CLASSPATH = $(JAVA_SRC_ROOT) - -JAVADOCFLAGS=-d $(DOCDIR) -JAVAFLAGS=-d $(JAVA_DEST_ROOT) -JARFLAGS=-cvf - -JAVA_OPTIONS = - -ifeq ($(TESTROOT),) -RELEASE_PATH=$(ERL_TOP)/release/$(TARGET) -else -RELEASE_PATH=$(TESTROOT) -endif - - -# ---------------------------------------------------- -# Make Rules -# ---------------------------------------------------- - -debug opt: make_dirs $(JAVA_DEST_ROOT)$(JARFILE) - -make_dirs: - if [ ! -d "$(JAVA_DEST_ROOT)" ];then mkdir "$(JAVA_DEST_ROOT)"; fi - -$(JAVA_DEST_ROOT)$(JARFILE): $(TARGET_FILES) - @(cd $(JAVA_DEST_ROOT) ; $(JAR) $(JARFLAGS) $(JARFILE) $(JAVA_CLASS_SUBDIR)) - -clean: - rm -f $(TARGET_FILES) *~ - -docs: - -# ---------------------------------------------------- -# Release Targets -# ---------------------------------------------------- - -# include $(ERL_TOP)/make/otp_release_targets.mk - -release release_docs release_tests release_html: - $(MAKE) -f Makefile.otp $(MFLAGS) RELEASE_PATH=$(RELEASE_PATH) $(TARGET_MAKEFILE) $@_spec - -release_spec: opt - $(INSTALL_DIR) $(RELSYSDIR)/java_src/com/ericsson/otp/erlang - $(INSTALL_DATA) $(JAVA_SRC) $(RELSYSDIR)/java_src/com/ericsson/otp/erlang - $(INSTALL_DIR) $(RELSYSDIR)/priv - $(INSTALL_DATA) $(JAVA_DEST_ROOT)$(JARFILE) $(RELSYSDIR)/priv - -release_docs_spec: - - - - -# ---------------------------------------------------- - -- cgit v1.2.3