Skip to content

Commit

Permalink
- put back more makefile targets
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed May 12, 2015
1 parent 2fc1cb8 commit 466750d
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 8 deletions.
19 changes: 18 additions & 1 deletion Makefile.in
Expand Up @@ -22,7 +22,7 @@ omc-diff:
$(MAKE) -C testsuite/difftool "OMBUILDDIR=@OMBUILDDIR@" CC="@CC@" CFLAGS="@CFLAGS@"

SOURCE_DIRS_UTF8=OMEdit/ OMShell/ OMNotebook/ OMOptim/ OMPlot/ OMCompiler/Compiler/ OMCompiler/SimulationRuntime/ `bash -c echo testsuite/flattening/libraries/3rdParty/{PlanarMechanics,siemens,SiemensPower,ThermoSysPro}` testsuite/openmodelica/modelicaML testsuite/AVM testsuite/simulation
SOURCE_DIRS=$(SOURCE_DIRS_UTF8) testsuite/flattening/libraries/3rdParty/HumMod
SOURCE_DIRS=$(SOURCE_DIRS_UTF8) # testsuite/flattening/libraries/3rdParty/HumMod

bom-error:
rm -f bom-error.log bom-error.sh
Expand All @@ -41,7 +41,24 @@ fix-whitespace:

spellcheck:
grep -oE 'gettext[(]["]([^"]|([\\]["]))*["]' `ls OMCompiler/Compiler/*/*.mo | grep -v Flags.mo` | sed "s/[\\%]./ /g" | aspell -p ./.openmodelica.aspell --mode=ccpp --lang=en_US list | sort -u | sed 's/^/aspell: /' | tee aspell.log
@test ! -s aspell.log
thumbsdb-error:
! find . -name "Thumbs.db" | grep Thumbs.db

utf8-error:
rm -f utf8-error.log*
find $(SOURCE_DIRS_UTF8) -regextype posix-egrep -regex '.*\.(cpp|c|h|mo|tpl)$$' -exec bash -c "iconv -f UTF-8 -t UTF-8 '{}' -o /dev/null 2>utf8-error.log2 || (echo -n '{}: ' && head -n1 utf8-error.log2)" ';' 2>&1 > utf8-error.log
# Also detect some valid UTF-8 that were obviously fracked up by Eclipse on Windows.
find $(SOURCE_DIRS_UTF8) -regextype posix-egrep -regex '.*\.(cpp|c|h|mo|tpl)$$' -exec bash -c "grep 'Link[^A-Za-z0-9_,.;&-]*ping' '{}' | grep -v Linköping && (echo '{}: Failed Linköping test')" ';' 2>&1 >> utf8-error.log
@cat utf8-error.log
@test ! -s utf8-error.log
rm -f utf8-error.log*

utf8-iconv:
rm -f tmp
find $(SOURCE_DIRS) -regextype posix-egrep -regex '.*\.(cpp|c|h|mo|tpl)$$' -exec bash -c "iconv -f UTF-8 -t UTF-8 '{}' -o /dev/null 2>tmp || (rm -f tmp && cp '{}' tmp && iconv -f ISO-8859-1 -t UTF-8 tmp -o '{}' && echo Converted {} to UTF-8)" ';'
rm -f tmp

clean:
test ! -d build || rm -r build/

Expand Down
46 changes: 39 additions & 7 deletions Makefile.omdev.mingw
Expand Up @@ -6,7 +6,7 @@ OMBUILDDIR=$(REALPATH)/build

omc:
$(MAKE) -f $(defaultMakefileTarget) -C OMCompiler OMBUILDDIR=$(OMBUILDDIR)

omc-diff: omc
$(MAKE) -C testsuite/ -f Makefile omc-diff OMBUILDDIR=$(OMBUILDDIR)

Expand All @@ -23,7 +23,7 @@ omedit: omplot
$(MAKE) -f $(defaultMakefileTarget) -C OMEdit OMBUILDDIR=$(OMBUILDDIR)

omnotebook: omplot
$(MAKE) -f $(defaultMakefileTarget) -C OMNotebook/OMNotebook/OMNotebookGUI OMBUILDDIR=$(OMBUILDDIR)
$(MAKE) -f $(defaultMakefileTarget) -C OMNotebook/OMNotebook/OMNotebookGUI OMBUILDDIR=$(OMBUILDDIR)

omshell:
$(MAKE) -f $(defaultMakefileTarget) -C OMShell/OMShell/OMShellGUI OMBUILDDIR=$(OMBUILDDIR)
Expand All @@ -32,22 +32,19 @@ omoptim: omplot
$(MAKE) -f $(defaultMakefileTarget) -C OMOptim OMBUILDDIR=$(OMBUILDDIR)

qtclients: omplot omedit omnotebook omshell omoptim

clean-qtclients:


simulationruntimecmsvc:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) simulationruntimecmsvc

runtimeCPPmsvcinstall:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) runtimeCPPmsvcinstall

runtimeCPPinstall:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) runtimeCPPinstall

runtimeCPPinstall:
$(MAKE) -C OMCompiler -f $(defaultMakefileTarget) OMBUILDDIR=$(OMBUILDDIR) runtimeCPPinstall

testlogwindows:
(time $(MAKE) -C testsuite -f Makefile 2>&1 | tee testsuite/testsuite-trace.txt) || true
(time $(MAKE) -C testsuite/openmodelica/cruntime/msvc/ -f Makefile >> testsuite/testsuite-trace.txt 2>&1) || true
Expand All @@ -60,6 +57,41 @@ testlogwindows:
cat testsuite/testsuite-trace.txt | grep "==== Log" | wc -l
cat testsuite/testsuite-trace.txt | grep "==== Log" ; echo DONE!

builddir_lib=$(OMBUILDDIR)/lib
builddir_share=$(OMBUILDDIR)/share
IDLPYTHON = $(OMDEV)/lib/omniORB-4.1.6-msvc-10/bin/x86_win32/omniidl -bpython -Wbglobal=_OMCIDL -Wbpackage=OMPythonIDL
IDLPYTHONTARGET = $(builddir_share)/omc/scripts/PythonInterface/OMPythonIDL/omc_communication_idl.py
IDLFILE=OMCompiler/Compiler/runtime/omc_communication.idl

install-python: $(IDLPYTHONTARGET)

.PHONY: script-files-python

script-files-python: mkbuilddirs-python
# copy library files neeeded by OMPython
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/x86_win32/_omnipy.pyd $(builddir_lib)/python)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/__init__.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/boxes_idl.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/CORBA.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/corbaidl_idl.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/minorCodes.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/PortableServer.py $(builddir_lib)/python/omniORB/)
(cp -puf $(OMDEV)/lib/omniORB-4.1.6-msvc-10/lib/python/omniORB/tcInternal.py $(builddir_lib)/python/omniORB/)
# copy OMPython files
cp -rfp OMPython/setup.py $(builddir_share)/omc/scripts/PythonInterface
cp -rfp OMPython/OMPython/* $(builddir_share)/omc/scripts/PythonInterface/OMPython

$(IDLPYTHONTARGET) : $(IDLFILE) script-files-python
$(IDLPYTHON) -C$(builddir_share)/omc/scripts/PythonInterface $(IDLFILE)

mkbuilddirs-python:
# create directories
mkdir -p $(builddir_lib)/python/omniORB
mkdir -p $(builddir_share)/omc/scripts/PythonInterface/OMPython/OMParser

clean-python:
rm -rf OMPython/build/ OMPython/OMPythonIDL/ OMPython/OMPython/_GlobalID* OMPython/OMPython/omc_communication_idl.py

clean:
$(MAKE) -f $(defaultMakefileTarget) -C OMCompiler clean OMBUILDDIR=$(OMBUILDDIR)
test ! -d $(OMBUILDDIR) || rm -rf $(OMBUILDDIR)

0 comments on commit 466750d

Please sign in to comment.