aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-02-09 10:31:22 +0100
committerDan Gudmundsson <[email protected]>2012-02-09 10:31:22 +0100
commitc1aca0c5ef53a97fa353dede5516a6f1e0e044a4 (patch)
treed6f2e4c8968cfb14bfa6250419a5ef7d9fa67d3a /lib
parent6004ec3e1785913ff0b74054cf614a35c180d54a (diff)
downloadotp-c1aca0c5ef53a97fa353dede5516a6f1e0e044a4.tar.gz
otp-c1aca0c5ef53a97fa353dede5516a6f1e0e044a4.tar.bz2
otp-c1aca0c5ef53a97fa353dede5516a6f1e0e044a4.zip
[wx] Cleanup Makefiles
Remove old "outside" otp building support.
Diffstat (limited to 'lib')
-rw-r--r--lib/wx/Makefile54
-rw-r--r--lib/wx/Notes60
-rw-r--r--lib/wx/README35
-rw-r--r--lib/wx/TODO30
-rw-r--r--lib/wx/api_gen/Makefile2
-rw-r--r--lib/wx/c_src/Makefile.in14
-rw-r--r--lib/wx/doc/src/Makefile59
-rw-r--r--lib/wx/examples/Makefile26
-rw-r--r--lib/wx/examples/demo/Makefile29
-rw-r--r--lib/wx/examples/simple/Makefile26
-rw-r--r--lib/wx/examples/sudoku/Makefile29
-rw-r--r--lib/wx/examples/xrc/Makefile10
-rwxr-xr-xlib/wx/install.es302
-rw-r--r--lib/wx/src/Makefile5
-rw-r--r--lib/wx/test/Makefile12
15 files changed, 56 insertions, 637 deletions
diff --git a/lib/wx/Makefile b/lib/wx/Makefile
index 9a75b2e36e..1ec225930e 100644
--- a/lib/wx/Makefile
+++ b/lib/wx/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2008-2012. 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%
#
@@ -33,53 +33,9 @@ endif #TERTIARY_BOOTSTRAP
CLEANDIRS = $(SUBDIRS) api_gen
-ifeq ($(INSIDE_ERLSRC),true)
-# we are inside erl src
# ----------------------------------------------------
# Default Subdir Targets
# ----------------------------------------------------
SUB_DIRECTORIES=$(SUBDIRS)
include $(ERL_TOP)/make/otp_subdir.mk
-else
-# we are building standalone wxErlang
-all: opt
-
-opt:
- @mkdir -p ebin
- @mkdir -p priv
- @mkdir -p c_src/$(SYS_TYPE)
- @for d in $(SUBDIRS); do \
- if test ! -d $$d ; then \
- echo "=== Skipping subdir $$d" ; \
- else \
- (cd $$d && $(MAKE) $@) ; \
- fi ; \
- done
-
-# clean, removes beam, object and target files
-
-clean:
- rm -f *~
- @for d in $(CLEANDIRS); do \
- if test ! -d $$d ; then \
- echo "=== Skipping subdir $$d" ; \
- else \
- (cd $$d && $(MAKE) $@) ; \
- fi ; \
- done
-
-docs:
- (cd doc/src/ && $(MAKE) $@)
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-libdir = @libdir@
-
-install:
- escript ./install.es $(INSTALLDIR)
-
-release:
- escript ./install.es --create_release
-
-endif
diff --git a/lib/wx/Notes b/lib/wx/Notes
deleted file mode 100644
index 3f48a3d4fb..0000000000
--- a/lib/wx/Notes
+++ /dev/null
@@ -1,60 +0,0 @@
-- [Dgud] Added wx_object implementation so user can create callback api
- as gen_server like process/objects which gets destroyed
- when the real objects are destroyed.
-- [Dgud] Added clienData to controlWithItems functions
-- [Dgud] Improved error handling, i.e. if 'This' is NULL gives a badarg
- and connect to non existing event type gives badarg.
-- [Dgud] Added wxCalendarEvent, wx*PickerEvents, wxTreeEvent wxNotebookEvent
-- [Dgud] Added wxStaticLine wxArtProvider wxClipboard
-- [Dgud] Reworked test directory
-- [RichardC] Fixed documentation Makefile
-- [Dgud] Fixed dialyzer warnings (Thanks Kostis)
- Fixed Bugs in wxBitmap and wxCursor
-- [RichardC] Fixed a lot of warnings in the demos and examples.
-- [Dgud] Fixed the internal event handling so that callbacks,
- and batch functions can not deadlock by using wxwidgets.
-- [Dgud] **Changed** backwards incompatible:
- Changed code generator so that enum and defines will be more
- stable in the future. This requires that your code will have
- to be recompiled.
-- [HarryH] wxMenuItem:GetBitmap/SetBitmap.
-- [HarryH] Started with the samples, menu.erl
-
-Old: 2008-05-26
-- [Dgud] **Changed** backwards incompatible:
- wxListBox, wxComboBox wxChoice wxCheckListBox
- function 'new': to use more optional values.
-- [Dgud] Added Notebook class
-- [Dgud] Added missing append/insert to ctrlWithItems
-- [Dgud] Added CalenderCtrl class
-- [Dgud] Added SizerItem functions
-- [Dgud] Add wxMDI* classes and wxLayoutAlgorithm
-- [Dgud] Added wxWindow:getHandle() -> integer() to be able to
- use platform dependent 3party libs
-- [Dgud] **Changed** backwards incompatible:
- #wx.user_data to #wx.userData to conform with wx api.
-- [Dgud] Fixed array of string bugs (in several functions).
-- [Dgud] Added data to command events
-- [Dgud] Added wxList(Ctrl) events
-
-- [Dgud] Fixed installer
-- [Dgud] **Changed** the wxEvtHandler:connect api
-- [Dgud] Fixed an event callback glitch.
-- [Dgud] Removed a memory leak, and optimized the object pointers.
-- [Dgud] Added wxMiniFrame and wxSash classes
-- [Dgud] Added wxStyledTextControl, requires larger binary but is nice
- for code viewing and editors.
-
-- [Dgud] Printing functionality, test implementation see sudoku demo
-- [Dgud] Added wxHtmlEasyPrinting, and classless functions to module wx_misc
-- [Dgud] Fixed Colors to actually work
-- [Dgud] Fixed enum guard tests
-
-
-- [Dgud] Fixed defines and added some global vars, incompatible
-- [Dgud] Fixed Colors to be {R,G,B,A} everywhere (optional in args)
-- [Dgud] Fixed memory cleaning and xrc (external dialog editor) support
-- [Dgud] Reworked event handling
-- [Dgud] Added GLU module and some functions
-- [Dgud] Fixed statusbar functions.
-- [Dgud] Prefix all records in wx.hrl with wx. \ No newline at end of file
diff --git a/lib/wx/README b/lib/wx/README
index e81f16681a..77cf6c6bda 100644
--- a/lib/wx/README
+++ b/lib/wx/README
@@ -1,4 +1,3 @@
-
REQUIREMENTS:
At least Erlang-R13B with smp enabled. It Requires unicode support.
@@ -10,17 +9,11 @@ REQUIREMENTS:
And I have given up on Solaris-8|9, wxWidgets on my old gtk version
doesn't run well, 7 of 10 wxWidgets examples seg fault.
Some early tests show that Solaris 10 works, though.
-
-INSTALLING:
- The prebuilt (windows and mac) version can be installed by invoking:
- install.es
- or
- /PATH/TO/ERL/bin/escript install.es
BUILDING:
You will need wxWidgets-2.8.*
- On mac I built wxwidgets with:
+ On mac (snow leopard) I built wxwidgets with:
mkdir MYBUILD; cd MYBUILD
../configure --with-opengl --enable-unicode --enable-graphics_ctx \
@@ -30,6 +23,8 @@ BUILDING:
cd contrib/src/stc/
make && make install
+ Or grab them prebuilt from macports.
+
On linux I have used the wxwidgets-libraries that came with
the distribution. It requires wxStyledTextControl which was
prebuilt on my linux, otherwise you have to build wxWidgets
@@ -48,30 +43,6 @@ BUILDING:
I havn't tested on cygwin at all.
You need to use werl on windows, erl (non-gui) hangs wxwidgets startup.
- make
- should work if erl, gcc and g++ and wx-config is found in path.
-
-
-HELPING:
- See TODO list.
- Use it, i.e. write code which tests the library, submit tests.
- See api_gen/Readme for improving the code generation.
- My C++ knowledge isn't the best, send patches and explain why
- so I can learn something.
-
-STATUS:
- Testing I havn't done more testing than the code in test directory.
- So please help by testing and writing test suites.
- Most classes needs some argument tweaking (in wxapi.conf) to
- work as expected, but I havn't read all the documentation and
- gone through every argument on every function.
-
- See (and run) the demo in the examples directory.
-
- This library is (currently) a driver, so if the you (or I) make errors,
- such as accessing deleted objects or other things wxWidgets didn't
- expect you to do, erlang will crash hard.
-
Cheers
Dan Gudmundsson
diff --git a/lib/wx/TODO b/lib/wx/TODO
deleted file mode 100644
index bf5553b9be..0000000000
--- a/lib/wx/TODO
+++ /dev/null
@@ -1,30 +0,0 @@
-
-Improve documentation.
-
-Fix all fixme's :-)
-
-Makefiles and configure tests
- Can always be improved, especially mine.
-
-Port programs instead of drivers.
- Another backend which doesn't crash the emulator during
- developing/testing or at customer site,
- Option to wx:new().
-
-Cleanup the code!!!!
-
-Platform specific classes/functions
- wxPrinterDC for example is mac and windows only.
-
-Add user_data now that erl_driver can unpack term_binaries.
-
-Add missing clases, especially the ones used in the api:
- wxDropTarget wxXmlResourceHandler wxGLContext
-
-Testing and debugging.
-
-API stuff: (Stuff I've or others have seen that I don't have time to fix right now)
-
-================
-
-Patch wxMac with CGwarpMouseCursorPosition \ No newline at end of file
diff --git a/lib/wx/api_gen/Makefile b/lib/wx/api_gen/Makefile
index 756ec598ce..15d62f90fd 100644
--- a/lib/wx/api_gen/Makefile
+++ b/lib/wx/api_gen/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2010. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. 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
diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
index d40ce88e99..ce7f4bf53e 100644
--- a/lib/wx/c_src/Makefile.in
+++ b/lib/wx/c_src/Makefile.in
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. 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
@@ -45,20 +45,11 @@ GL_H = egl_impl.h gen/glu_finit.h gen/gl_finit.h gen/gl_fdefs.h
HAVE_OPENGL = true
OPENGL_F = gl_funcs egl_impl
-ifneq ($(INSIDE_ERLSRC),true)
-
-ERL_DIR = @ERLANG_ROOT_DIR@
-ERL_INCS = -I$(ERL_DIR)/usr/include
-
-else
-
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
ERL_INCS= $(DED_INCLUDES)
-endif
-
SYS_TYPE = @WXERL_SYS_TYPE@
GENERAL_O = $(GENERAL:%=$(SYS_TYPE)/%.o)
@@ -183,7 +174,6 @@ $(TARGET_DIR)/erl_gl$(SO_EXT): $(GL_OBJECTS)
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
-ifeq ($(INSIDE_ERLSRC),true)
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/priv
@@ -193,5 +183,3 @@ release_spec: opt
$(INSTALL_PROGRAM) $(TARGET_DIR)/erl_gl$(SO_EXT) $(RELSYSDIR)/priv/
release_docs_spec:
-
-endif
diff --git a/lib/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile
index 03e9f1e1bb..663a400dd0 100644
--- a/lib/wx/doc/src/Makefile
+++ b/lib/wx/doc/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2010. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. 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
@@ -33,40 +33,7 @@ GenMods = $(shell ls ../../src/gen | grep 'wx[A-Z].*\.erl') \
ModsNoExt = $(ErlMods:%.erl=%) $(GenMods:%.erl=%)
-ifneq ($(INSIDE_ERLSRC),true)
-# ----------------------------------------------------
-# Standalone release
-# ----------------------------------------------------
-Mods = $(ErlMods:%=../../src/%) $(GenMods:%=../../src/gen/%)
-HTML_FILES = $(ErlMods:%.erl=../html/%.html) $(GenMods:%.erl=../html/%.html)
-
-GIF_FILES = ../html/erlang.png
-EXTRA_FILES = ../html/index.html \
- ../html/modules-frame.html \
- ../html/overview-summary.html \
- ../html/packages-frame.html
-
-HTML_STYLESHEET_FILES = ../html/stylesheet.css
-
-html: ../html/edoc-info
-
-docs: ../html/edoc-info
-
-../html/edoc-info: $(Mods)
- @echo "Building documentation."
- -mkdir -p ../html
- erl -noshell -pa doc -run edoc_run application "wx" '"../.."' '[{private,true},no_packages,{dir,"../html"}, {sort_functions,false}]'
-
-clean:
- rm -f *~
- (cd ../html; rm -f *.html *.css erlang.png edoc-info)
-
-opt debug:
-else
# Release directory specification
-# ----------------------------------------------------
-# Inside the erlang src
-# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
XML_REF3_FILES = $(ErlMods:%.erl=%.xml) $(GenMods:%.erl=%.xml)
@@ -96,10 +63,10 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
# ----------------------------------------------------
-# FLAGS
+# FLAGS
# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
+XML_FLAGS +=
+DVIPS_FLAGS +=
# ----------------------------------------------------
# Targets
@@ -117,16 +84,16 @@ man: $(MAN3_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
+xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
-ref_man.xml: ref_man.xml.src
+ref_man.xml: ref_man.xml.src
@echo Preparing ref_man.xml
@cat ref_man.xml.src > ref_man.xml
@for d in $(ModsNoExt); do \
echo " <xi:include href=\"$$d.xml\"/>" >> ref_man.xml ; \
done
@echo "</application>" >> ref_man.xml
- @echo
+ @echo
$(ErlMods:%.erl=%.xml):
escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -sort_functions false ../../src/$(@:%.xml=%.erl)
@@ -135,12 +102,12 @@ $(GenMods:%.erl=%.xml):
escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -sort_functions false ../../src/gen/$(@:%.xml=%.erl)
$(XML_CHAPTER_FILES):
- escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -chapter ../overview.edoc
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) -chapter ../overview.edoc
-debug opt:
+debug opt:
clean clean_docs:
- rm -rf $(HTMLDIR)/*
+ rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
rm -f errs core *~ ../html/edoc-info
@@ -148,7 +115,7 @@ clean clean_docs:
# ----------------------------------------------------
# Release Target
-# ----------------------------------------------------
+# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
@@ -162,8 +129,6 @@ release_docs_spec: docs
$(INSTALL_DIR) $(RELEASE_PATH)/man/man3
$(INSTALL_DATA) $(MAN3_FILES) $(RELEASE_PATH)/man/man3
-release_spec:
+release_spec:
release_tests_spec:
-
-endif
diff --git a/lib/wx/examples/Makefile b/lib/wx/examples/Makefile
index ae0ed687eb..48fccc88f7 100644
--- a/lib/wx/examples/Makefile
+++ b/lib/wx/examples/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. 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%
#
@@ -22,24 +22,8 @@ include ../config.mk
SUBDIRS = demo sudoku simple xrc
-ifeq ($(INSIDE_ERLSRC),true)
SUB_DIRECTORIES=$(SUBDIRS)
# ----------------------------------------------------
# Default Subdir Targets
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_subdir.mk
-
-else
-# standalone build
-opt debug clean:
- @for d in $(SUBDIRS); do \
- if test ! -d $$d ; then \
- echo "=== Skipping subdir $$d" ; \
- else \
- (cd $$d && $(MAKE) $@) ; \
- fi ; \
- done
-
-docs:
-
-endif
diff --git a/lib/wx/examples/demo/Makefile b/lib/wx/examples/demo/Makefile
index 3f054ec75f..872723fb98 100644
--- a/lib/wx/examples/demo/Makefile
+++ b/lib/wx/examples/demo/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. 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%
#
@@ -52,7 +52,7 @@ TESTMODS = \
ex_static \
ex_textCtrl \
ex_treeCtrl \
- ex_graphicsContext
+ ex_graphicsContext
TESTTARGETS = $(TESTMODS:%=%.beam)
@@ -64,21 +64,15 @@ clean:
rm -f $(TESTTARGETS)
rm -f *~ core erl_crash.dump
-docs:
+docs:
run: opt
- erl -smp -detached -pa $(TOPDIR)/ebin -s demo
-
-ifneq ($(INSIDE_ERLSRC),true)
+ erl -smp -detached -pa $(TOPDIR)/ebin -s demo
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/demo
include $(ERL_TOP)/make/otp_release_targets.mk
-docs:
+docs:
release_spec: opt
$(INSTALL_DIR) $(EXRELSYSDIR)
@@ -89,8 +83,3 @@ release_spec: opt
release_tests_spec:
release_docs_spec:
-
-endif
-
-
-
diff --git a/lib/wx/examples/simple/Makefile b/lib/wx/examples/simple/Makefile
index 295e739202..0178aea890 100644
--- a/lib/wx/examples/simple/Makefile
+++ b/lib/wx/examples/simple/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. 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%
#
@@ -35,21 +35,15 @@ clean:
rm -f $(TESTTARGETS)
rm -f *~ core erl_crash.dump
-docs:
+docs:
run: opt
- erl -smp -detached -pa $(TOPDIR)/ebin -s hello
-
-ifneq ($(INSIDE_ERLSRC),true)
+ erl -smp -detached -pa $(TOPDIR)/ebin -s hello
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/simple
include $(ERL_TOP)/make/otp_release_targets.mk
-docs:
+docs:
release_spec: opt
$(INSTALL_DIR) $(EXRELSYSDIR)
@@ -59,7 +53,3 @@ release_spec: opt
release_tests_spec:
release_docs_spec:
-
-endif
-
-
diff --git a/lib/wx/examples/sudoku/Makefile b/lib/wx/examples/sudoku/Makefile
index a7cbf85e03..89919ff50c 100644
--- a/lib/wx/examples/sudoku/Makefile
+++ b/lib/wx/examples/sudoku/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2012. 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%
#
@@ -25,7 +25,7 @@ SRC = .
BIN = .
ERLINC = $(TOPDIR)/include
ERLC = erlc
-TESTMODS = sudoku sudoku_board sudoku_game sudoku_gui
+TESTMODS = sudoku sudoku_board sudoku_game sudoku_gui
TESTTARGETS = $(TESTMODS:%=%.beam)
TESTSRC = $(TESTMODS:%=%.erl)
@@ -35,21 +35,15 @@ clean:
rm -f $(TESTTARGETS)
rm -f *~ core erl_crash.dump
-docs:
+docs:
run: opt
- erl -smp -detached -pa $(TOPDIR)/ebin -s sudoku
-
-ifneq ($(INSIDE_ERLSRC),true)
+ erl -smp -detached -pa $(TOPDIR)/ebin -s sudoku
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/sudoku
include $(ERL_TOP)/make/otp_release_targets.mk
-docs:
+docs:
release_spec: opt
$(INSTALL_DIR) $(EXRELSYSDIR)
@@ -59,8 +53,3 @@ release_spec: opt
release_tests_spec:
release_docs_spec:
-
-endif
-
-
-
diff --git a/lib/wx/examples/xrc/Makefile b/lib/wx/examples/xrc/Makefile
index 79d86ac1b9..341fdbb2cc 100644
--- a/lib/wx/examples/xrc/Makefile
+++ b/lib/wx/examples/xrc/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2009-2011. All Rights Reserved.
+# Copyright Ericsson AB 2009-2012. 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
@@ -49,12 +49,6 @@ docs:
run: opt
erl -smp -detached -pa $(TOPDIR)/ebin -s xrc
-ifneq ($(INSIDE_ERLSRC),true)
-
-%.beam: %.erl
- $(ERLC) -W -I$(ERLINC) -bbeam -o$(BIN) $<
-
-else
EXRELSYSDIR = $(RELSYSDIR)/examples/xrc
include $(ERL_TOP)/make/otp_release_targets.mk
@@ -71,7 +65,5 @@ release_tests_spec:
release_docs_spec:
-endif
-
diff --git a/lib/wx/install.es b/lib/wx/install.es
deleted file mode 100755
index 2811c7728c..0000000000
--- a/lib/wx/install.es
+++ /dev/null
@@ -1,302 +0,0 @@
-#!/usr/bin/env escript
-%% -*- erlang -*-
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-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%
-%%
-%% Install wx to an erlang distribution.
-%%
-
--module('install_es'). %% Temp workaround for buggy escript
--mode(compile).
-
-usage() ->
- io:format("install [Opts] [InstallDir]~n",[]),
- io:format(" -v verbose~n",[]),
- io:format(" -q quiet and direct no questions~n",[]),
- io:format(" --create_release To create a release~n~n",[]),
- ok.
-
-main([]) ->
- IDir = filename:join(code:root_dir(),"lib"),
- install(IDir),
- ok;
-main(Opts) ->
- IDir = options(Opts),
- install(IDir),
- ok.
-
-install_files() ->
- [{[], {files, ["README","TODO", "Notes", "license.terms"]}},
- {[src], {list, "*.?rl"}},
- {[include], {list, "*.hrl"}},
- {[src,gen], {list, "*.?rl"}},
- {[test], {list, "*.?rl"}},
- {[test], {list, "*.bmp"}},
- {[test], {files, ["wxt", "Readme"]}},
- {[samples], {files, ["sample.xpm"]}},
- {[samples,menu], {files, ["copy.xpm"]}},
- {[samples,'*'], {list, "*.?rl"}},
- {[demos,'*'], {list, "*.?rl"}},
- {[demos,xrc,rc], {list, "*"}},
- {[doc,html], {files, ["edoc-info", "erlang.png", "stylesheet.css"]}}
- ].
-
-built_files(SrcDir, Type) ->
- Dirs = [{[doc], {list, "*.html"}},
- {[ebin], {list, "*"}},
- {[test], {list, "*.beam"}},
- {[demos,'*'], {list, "*.beam"}},
- {[samples,'*'], {list, "*.beam"}}],
- case Type of
- install ->
- [{[priv,'*'], {list, "*"}}|Dirs];
- _ -> %% Create Rel
- Win32 = [{[priv,win32], {list, "*"}}| Dirs],
- case filelib:wildcard("i386-apple*",
- filename:join(SrcDir, "priv")) of
- [Mac] ->
- [{[priv,list_to_atom(Mac)], {list, "*"}}|Win32];
- [] ->
- io:format("WARNING: Missing Mac driver!~n",[]),
- Win32
- end
- end.
-
-release_files() ->
- [{[], {files, ["configure.in","Makefile","wxwin.m4", "config.mk.in", "vsn.mk"]}},
- {[], {files, ["configure", "install.es"]}},
- {[autoconf], {files, ["config.guess","config.sub","install-sh"]}},
- {[src], {files, ["Makefile"]}},
- {[c_src], {files, ["Makefile.in"]}},
- {[c_src], {list, "*.c*"}},
- {[c_src], {list, "*.h"}},
- {[c_src,gen], {list, "*.cpp"}},
- {[c_src,gen], {list, "*.h"}},
- {[doc], {files, ["overview.edoc"]}},
- {[doc,src], {files, ["Makefile"]}},
- {[test], {files, ["Makefile"]}},
-%% {[demos], {files, ["Makefile"]}},
-%% {[demos,'*'], {files, ["Makefile"]}},
-%% {[samples], {files, ["Makefile"]}},
-%% {[samples,'*'], {files, ["Makefile"]}},
- {[api_gen], {list, "*.?rl"}},
- {[api_gen], {list, "*.conf"}},
- {[api_gen], {files, ["Makefile", "README"]}},
- {[api_gen, wx_extra], {list, "*"}}
- ].
-
-options(["-v"|Os]) ->
- put(verbose,true),
- options(Os);
-options(["-q"|Os]) ->
- put(quiet,true),
- options(Os);
-options(["--help"|_]) ->
- usage(),
- halt(0);
-options(["-h"|_]) ->
- usage(),
- halt(0);
-options(["--create_release"|Os]) ->
- put(create_release,true),
- options(Os);
-options(["-" ++_ |_Os]) ->
- usage(),
- halt(1);
-options([Dir]) -> Dir;
-options([]) ->
- filename:join(code:root_dir(),"lib").
-
-install(Dir) ->
- try
- case get(create_release) of
- true -> create_release();
- _ -> install2(Dir)
- end
- catch E:R ->
- io:format("Error ~p:~p in ~n ~p~n",[E,R, erlang:get_stacktrace()])
- end.
-
-install2(IDir) ->
- SrcD = get_src_dir(),
- Ver = get_version(SrcD),
- case get(quiet) of
- true ->
- copy_files(SrcD, filename:append(IDir,Ver)),
- ok;
- _ ->
- io:format("Installing ~p~n From ~p to ~p ~n",[Ver,SrcD,IDir]),
- case is_ok('ok [y|n]? ',[y,n]) of
- y ->
- copy_files(SrcD, filename:append(IDir,Ver)),
- io:format("Install complete~n",[]),
- ok;
- n ->
- usage(),
- halt(1)
- end
- end.
-
-copy_files(FromD, ToD) ->
- Fs = install_files() ++ built_files(FromD, install),
- Copy = fun(File, From, To, Acc) ->
- ensure_dir(To),
- case file:copy(filename:join(From,File),
- filename:join(To,File)) of
- {ok, _Bytes} ->
- [File|Acc];
- {error,_} ->
- io:format("ERROR Could not install file: ~p in~n ~p~n",
- [filename:join(From,File),
- filename:join(To,File)]),
- Acc
- end
- end,
- [expand_dirs(Dir,Files,FromD,ToD,Copy,[]) || {Dir,Files} <- Fs].
-
-expand_dirs(['*'|Ds],Fs,From,To,Fun,Acc) ->
- All = filelib:wildcard("[A-Za-z]*", From),
- Filter = fun(F) -> filelib:is_dir(filename:join(From,F)) end,
- Dirs = lists:filter(Filter, All),
- lists:foldl(fun(Dir,Nacc) ->
- expand_dirs([Dir|Ds],Fs,From,To,Fun,Nacc)
- end,
- Acc, Dirs);
-expand_dirs([Dir|Ds],Fs,From,To,Fun,Acc) ->
- expand_dirs(Ds,Fs,filename:join(From,Dir),filename:join(To,Dir),Fun,Acc);
-expand_dirs([],Fs,From,To,Fun,Acc) ->
- expand_files(Fs,From,To,Fun,Acc).
-
-expand_files({files,Fs},From,To,Fun,Acc) ->
- case get(verbose) of
- true -> io:format(" Check dir ~p to ~p~n", [From,To]);
- _ -> ok
- end,
- expand_files2(Fs,From,To,Fun,Acc);
-expand_files({list,WildCard},From,To,Fun,Acc) ->
- All = filelib:wildcard(WildCard, From),
- Filter = fun(F) -> filelib:is_regular(filename:join(From,F)) end,
- Fs = lists:filter(Filter, All),
- case get(verbose) of
- true -> io:format(" Check dir ~p to ~p~n", [From,To]);
- _ -> ok
- end,
- expand_files2(Fs,From,To,Fun,Acc).
-
-expand_files2(Fs,From,To,Fun,PrevAcc) ->
- lists:foldl(fun(File, Acc) -> Fun(File, From, To, Acc) end, PrevAcc, Fs).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-create_release() ->
- All = release_files() ++ install_files(),
- SrcD = get_src_dir(),
- Ver = "wx-" ++ get_version(SrcD),
- io:format("Create release ~p~n From ~p ~n",[Ver,SrcD]),
- case is_ok('ok [y|n]? ',[y,n]) of
- y ->
- List = fun(File, From, To, Acc) ->
- case filelib:is_regular(filename:join(From,File)) of
- true ->
- [{filename:join(To, File),
- filename:join(From,File)}|Acc];
- false ->
- io:format("Warning: File ~s/~s is missing~n",[From,File]),
- Acc
- end
- end,
- Expand = fun({Dir,Fs},Acc) ->
- expand_dirs(Dir,Fs,SrcD,Ver,List,Acc)
- end,
- Files = lists:foldl(Expand,[], All),
- ok = erl_tar:create(Ver ++ ".src.tar.gz", Files, [compressed]),
- BuiltDir = built_files(SrcD, create_release),
- BuiltFs = lists:foldl(Expand,[], BuiltDir),
- ok = erl_tar:create(Ver ++ ".built.tar.gz",
- Files ++ BuiltFs,
- [compressed]),
- ok;
- n ->
- usage()
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-is_ok(Str, Answers) ->
- {ok, [Ans]} = io:fread(Str, "~a"),
- case lists:member(Ans, Answers) of
- true -> Ans;
- false ->
- io:format("Please answer ~p~n",[Answers]),
- is_ok(Str,Answers)
- end.
-
-
-ensure_dir(To) ->
- case filelib:ensure_dir(filename:join(To, "dummy")) of
- ok -> ok;
- Error ->
- io:format("Error ~p in ~p ~n",[Error, To]),
- halt(1)
- end.
-
-get_version(Dir) ->
- %% Have we installed this from a release
- %% get the directory name
- DateVariant =
- fun() ->
- {_,Month,Day} = erlang:date(),
- Date = io_lib:format("~.2.0w~.2.0w",[Month,Day]),
- {ok, Bin} = file:read_file("vsn.mk"),
- Opt = [{capture, all_but_first, list}],
- case re:run(Bin, "WX_VSN\s*=\s*(.*)", Opt) of
- {match, [Ver]} ->
- lists:flatten([Ver,"."|Date]);
- _ ->
- lists:flatten(["wx-0.98."|Date])
- end
- end,
- case Dir of
- "." ->
- %% Installing from src without a release
- DateVariant();
- Dir ->
- Base = filename:basename(Dir),
- case string:tokens(Base, "-.") of
- ["wx", Ma, Mi|_]
- when is_integer(Ma),is_integer(Mi) ->
- Base;
- _ ->
- DateVariant()
- end
- end.
-
-%% Get src dir of installation
-get_src_dir() ->
- Escript = escript:script_name(),
- Abs = filename:dirname(filename:absname(Escript)),
- Test = filename:join(Abs, "README"),
- case file:read_file(Test) of
- {ok, _} -> ok;
- {error, enoent} ->
- io:format("Error couldn't read ~s ~n",[Test]),
- halt(1)
- end,
- Abs.
-
-
diff --git a/lib/wx/src/Makefile b/lib/wx/src/Makefile
index 4e5971de03..16b425e6f0 100644
--- a/lib/wx/src/Makefile
+++ b/lib/wx/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. 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
@@ -20,7 +20,6 @@
include ../vsn.mk
ifdef TERTIARY_BOOTSTRAP
VSN = $(WX_VSN)
- INSIDE_ERLSRC = true
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
RELSYSDIR = $(RELEASE_PATH)/lib/wx-$(VSN)
@@ -119,7 +118,6 @@ $(EBIN)/%.beam: $(EGEN)/%.erl $(HEADER_FILES)
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
-ifeq ($(INSIDE_ERLSRC), true)
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/src
@@ -134,4 +132,3 @@ release_spec: opt
# $(INSTALL_DATA) ../$(ARCHIVE) $(RELEASE_PATH)/lib
release_docs_spec:
-endif
diff --git a/lib/wx/test/Makefile b/lib/wx/test/Makefile
index 333711789f..ac8a4bdd60 100644
--- a/lib/wx/test/Makefile
+++ b/lib/wx/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2011. All Rights Reserved.
+# Copyright Ericsson AB 2008-2012. 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
@@ -48,14 +48,6 @@ clean:
docs:
-
-# Rules
-ifneq ($(INSIDE_ERLSRC),true)
-
-$(EBIN)/%.beam: $(ESRC)/%.erl
- $(ERLC) -W -bbeam $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -o$(EBIN) $<
-
-else
RELSYSDIR = $(RELEASE_PATH)/wx_test
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec:
@@ -66,5 +58,3 @@ release_tests_spec: opt
$(INSTALL_SCRIPT) wxt $(RELSYSDIR)
release_docs_spec:
-
-endif