Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
2b336f90
Commit
2b336f90
authored
Nov 21, 2010
by
Claes Sjöfors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pwre configure script added for MacOS
parent
e2237106
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
4212 additions
and
8 deletions
+4212
-8
java/exe/jpwr_rt_gdh/src/os_templ/link_rule.mk
java/exe/jpwr_rt_gdh/src/os_templ/link_rule.mk
+3
-3
otherio/exp/rt/src/libusbio.h
otherio/exp/rt/src/libusbio.h
+0
-0
otherio/exp/rt/src/os_templ/hw_templ/makefile
otherio/exp/rt/src/os_templ/hw_templ/makefile
+1
-1
profibus/lib/rt/src/os_linux/rt_io_m_pncontrollersoftingpnak.cpp
...s/lib/rt/src/os_linux/rt_io_m_pncontrollersoftingpnak.cpp
+0
-0
profibus/lib/rt/src/os_linux/rt_io_m_pndevice.cpp
profibus/lib/rt/src/os_linux/rt_io_m_pndevice.cpp
+0
-0
profibus/lib/rt/src/os_linux/rt_io_m_pnmodule.cpp
profibus/lib/rt/src/os_linux/rt_io_m_pnmodule.cpp
+0
-0
profibus/lib/rt/src/os_linux/rt_io_pn_locals.h
profibus/lib/rt/src/os_linux/rt_io_pn_locals.h
+0
-0
profibus/lib/rt/src/os_linux/rt_pn_iface.cpp
profibus/lib/rt/src/os_linux/rt_pn_iface.cpp
+0
-0
profibus/lib/rt/src/os_linux/rt_pn_iface.h
profibus/lib/rt/src/os_linux/rt_pn_iface.h
+0
-0
profibus/lib/rt/src/os_linux/rt_pnak.h
profibus/lib/rt/src/os_linux/rt_pnak.h
+0
-0
profibus/lib/rt/src/os_linux/rt_profinet.h
profibus/lib/rt/src/os_linux/rt_profinet.h
+0
-0
profibus/lib/rt/src/os_templ/hw_templ/special.mk
profibus/lib/rt/src/os_templ/hw_templ/special.mk
+3
-1
src/doc/man/src/os_templ/hw_templ/makefile
src/doc/man/src/os_templ/hw_templ/makefile
+1
-1
src/exe/rt_io_comm/src/os_templ/link_rule.mk
src/exe/rt_io_comm/src/os_templ/link_rule.mk
+1
-1
src/exe/wb_rtt/src/os_templ/link_rule.mk
src/exe/wb_rtt/src/os_templ/link_rule.mk
+1
-1
src/tools/bld/src/os_macos/exe_generic.mk
src/tools/bld/src/os_macos/exe_generic.mk
+167
-0
src/tools/bld/src/os_macos/hw_x86_64/variables.mk
src/tools/bld/src/os_macos/hw_x86_64/variables.mk
+239
-0
src/tools/bld/src/os_macos/jpwr_generic.mk
src/tools/bld/src/os_macos/jpwr_generic.mk
+168
-0
src/tools/bld/src/os_macos/lib_generic.mk
src/tools/bld/src/os_macos/lib_generic.mk
+222
-0
src/tools/bld/src/os_macos/link_rule_generic.mk
src/tools/bld/src/os_macos/link_rule_generic.mk
+8
-0
src/tools/bld/src/os_macos/mmi_generic.mk
src/tools/bld/src/os_macos/mmi_generic.mk
+137
-0
src/tools/bld/src/os_macos/msg_generic.mk
src/tools/bld/src/os_macos/msg_generic.mk
+90
-0
src/tools/bld/src/os_macos/rules.mk
src/tools/bld/src/os_macos/rules.mk
+244
-0
src/tools/bld/src/os_macos/wbl_generic.mk
src/tools/bld/src/os_macos/wbl_generic.mk
+242
-0
src/tools/pwre/src/os_macos/dir_symbols.mk
src/tools/pwre/src/os_macos/dir_symbols.mk
+71
-0
src/tools/pwre/src/os_macos/ebuild.dat
src/tools/pwre/src/os_macos/ebuild.dat
+16
-0
src/tools/pwre/src/os_macos/hw_x86_64/import_dbs.sh
src/tools/pwre/src/os_macos/hw_x86_64/import_dbs.sh
+33
-0
src/tools/pwre/src/os_macos/hw_x86_64/import_files.mk
src/tools/pwre/src/os_macos/hw_x86_64/import_files.mk
+238
-0
src/tools/pwre/src/os_macos/pwre.pl
src/tools/pwre/src/os_macos/pwre.pl
+1675
-0
src/tools/pwre/src/os_macos/pwre.source
src/tools/pwre/src/os_macos/pwre.source
+58
-0
src/tools/pwre/src/os_macos/pwre_configure.sh
src/tools/pwre/src/os_macos/pwre_configure.sh
+303
-0
src/tools/pwre/src/os_macos/pwre_function
src/tools/pwre/src/os_macos/pwre_function
+193
-0
src/tools/pwre/src/os_macos/pwre_merge.sh
src/tools/pwre/src/os_macos/pwre_merge.sh
+98
-0
No files found.
java/exe/jpwr_rt_gdh/src/os_templ/link_rule.mk
View file @
2b336f90
...
...
@@ -3,7 +3,7 @@ link_rule_mk := 1
link
=
$(ldxx)
-shared
-DHW_X86
-DOS_LINUX
\
-L
${pwr_elib}
\
-L
${pwr_lib}
\
-L
${pwr_lib}
$(pwre_conf_libdir)
\
${pwre_broot}
/
${pwre_target}
/bld/lib/co/
*
.o
\
$(rt_msg_eobjs)
\
${pwre_broot}
/
${pwre_target}
/bld/lib/msg_dummy/msg_dummy_qcom.o
\
...
...
@@ -25,9 +25,9 @@ link = $(ldxx) -shared -DHW_X86 -DOS_LINUX \
${pwre_broot}
/
${pwre_target}
/bld/exe/jpwr_rt_gdh/jpwr_rt_gdh.o
\
${pwre_broot}
/
${pwre_target}
/bld/lib/statussrv/
*
.o
\
${pwre_broot}
/
${pwre_target}
/exp/obj/stdsoap2.o
\
-o
${pwr_exe}
/libjpwr_rt_gdh.so
$(pwre_conf_lib
)
-o
${pwr_exe}
/libjpwr_rt_gdh.so
$(pwre_conf_lib
pwrotherio)
$(pwre_conf_lib)
-lpwr_dtt
# -lm -lpthread -lrt -lcrypt -lpwr_dtt -lpwr_usbio_dummy -ldb
# -lm -lpthread -lrt -lcrypt -lpwr_dtt -lpwr_usbio_dummy
-ldb
# -lSM -lICE -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp\
# ${pwre_broot}/${pwre_target}/bld/lib/flow/*.o \
...
...
otherio/exp/rt/src/
os_linux/
libusbio.h
→
otherio/exp/rt/src/libusbio.h
View file @
2b336f90
File moved
otherio/exp/rt/src/os_templ/hw_templ/makefile
View file @
2b336f90
...
...
@@ -39,7 +39,7 @@ realclean : clean $(clean_obj)
# @ echo "Copying libusbio.a"
# @ $(cp) $(cpflags) $(source) $(target)
$(inc_dir)/libusbio.h
:
../libusbio.h
$(inc_dir)/libusbio.h
:
../
../
libusbio.h
@
echo
"Copying libusbio.h"
@
$(cp)
$(cpflags)
$(source)
$(target)
...
...
profibus/lib/rt/src/rt_io_m_pncontrollersoftingpnak.cpp
→
profibus/lib/rt/src/
os_linux/
rt_io_m_pncontrollersoftingpnak.cpp
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_io_m_pndevice.cpp
→
profibus/lib/rt/src/
os_linux/
rt_io_m_pndevice.cpp
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_io_m_pnmodule.cpp
→
profibus/lib/rt/src/
os_linux/
rt_io_m_pnmodule.cpp
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_io_pn_locals.h
→
profibus/lib/rt/src/
os_linux/
rt_io_pn_locals.h
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_pn_iface.cpp
→
profibus/lib/rt/src/
os_linux/
rt_pn_iface.cpp
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_pn_iface.h
→
profibus/lib/rt/src/
os_linux/
rt_pn_iface.h
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_pnak.h
→
profibus/lib/rt/src/
os_linux/
rt_pnak.h
View file @
2b336f90
File moved
profibus/lib/rt/src/rt_profinet.h
→
profibus/lib/rt/src/
os_linux/
rt_profinet.h
View file @
2b336f90
File moved
profibus/lib/rt/src/os_templ/hw_templ/special.mk
View file @
2b336f90
...
...
@@ -23,4 +23,6 @@ lib : $(export_lib) export_lib_local
export_lib_local
:
$(export_c)
@
echo
"Inserting local lib"
@
$(ar)
-r
$(export_lib)
$(export_c)
@
if
[
"
$(export_c)
"
!=
""
]
;
then
\
$(ar)
-r
$(export_lib)
$(export_c)
;
\
fi
src/doc/man/src/os_templ/hw_templ/makefile
View file @
2b336f90
...
...
@@ -465,7 +465,7 @@ $(doc_dir)/sv_se/%.css $(doc_dir)/en_us/%.css :: $(pwre_sroot)/doc/man/src/%.css
# all-purpose rule for graphics/media
$(doc_dir)/%
::
$(pwre_sroot)/doc/man/src/%
@
echo
"copy
$(source)
"
@
cp
-u
$(source)
$(target)
@
cp
$(source)
$(target)
# Rule for creating titlepage xsl templates
$(pwre_sroot)/doc/man/src/pwrtitlepages.xsl
::
$(pwre_sroot)/doc/man/src/pwrtitlepage.spec.xml
...
...
src/exe/rt_io_comm/src/os_templ/link_rule.mk
View file @
2b336f90
...
...
@@ -5,7 +5,7 @@ ifeq ($(export_type),exp)
link
=
$(ld)
$(explinkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_objs)
\
$(pwr_obj)
/rt_io_user.o
\
$(pwre_conf_libpwrrt)
$(pwre_conf_lib)
$(pwre_conf_libpwrrt)
$(pwre_conf_lib)
$(pwre_conf_libpwrotherio)
else
link
=
$(ld)
$(elinkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_objs)
\
...
...
src/exe/wb_rtt/src/os_templ/link_rule.mk
View file @
2b336f90
...
...
@@ -4,6 +4,6 @@ link_rule_mk := 1
link
=
$(ldxx)
$(linkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_objs)
\
$(pwr_obj)
/rt_io_user.o
-L
$(pwr_elib)
\
-lpwr_rt
-lpwr_co
-lpwr_msg_dummy
-lrpcsvc
-lpthread
-lm
-lrt
-lcrypt
$(pwre_conf_libpwrrt)
$(pwre_conf_lib)
endif
src/tools/bld/src/os_macos/exe_generic.mk
0 → 100644
View file @
2b336f90
# exe_generic.mk -- generic makefile for executables
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# To build an executable.
#
ifndef
exe_generic_mk
exe_generic_mk
:=
1
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
ifndef
link_rule_mk
link_rule
:=
link_rule.mk
-include
$(link_rule)
endif
ifndef
link_rule_mk
link_rule
:=
../link_rule.mk
-include
$(link_rule)
endif
ifndef
link_rule_mk
link_rule
:=
$(pwre_kroot)
/tools/bld/src/
$(os_name)
/link_rule_generic.mk
include
$(link_rule)
endif
vpath %.c $(hw_source)
:
$(os_source):$(co_source)
vpath %.cpp $(hw_source)
:
$(os_source):$(co_source)
vpath %.l $(hw_source)
:
$(os_source):$(co_source)
vpath %.h $(hw_source)
:
$(os_source):$(co_source)
vpath %.hpp $(hw_source)
:
$(os_source):$(co_source)
source_dirs
=
$(hw_source)
$(os_source)
$(co_source)
c_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.c
$(dir)
/
*
.cpp
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
l_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.l
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
h_includes
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.h
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
hpp_includes
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.hpp
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
exe_name
:=
$(comp_name)
exe_source
:=
$(
filter
$(exe_name)
.%,
$(c_sources)
)
c_sources
:=
$(
filter-out
$(exe_source)
,
$(c_sources)
)
export_exe
:=
$(exe_dir)
/
$(exe_name)$(exe_ext)
#export_obj := $(obj_dir)/$(exe_name)$(obj_ext)
export_obj
:=
$(bld_dir)
/
$(exe_name)$(obj_ext)
export_includes
:=
$(
addprefix
$(inc_dir)
/,
$(h_includes)
$(hpp_includes)
)
l_targets
:=
$(
addprefix
$(bld_dir)
/,
$(
basename
$(l_sources)
))
l_targets
:=
$(
addsuffix
$(c_ext)
,
$(l_targets)
)
objects
:=
$(
addprefix
$(bld_dir)
/,
$(
basename
$(c_sources)
))
objects
+=
$(
addprefix
$(bld_dir)
/,
$(
basename
$(l_sources)
))
objects
:=
$(
strip
$(
addsuffix
$(obj_ext)
,
$(objects)
))
lc_src_dep
:=
$
(
objects:
$(obj_ext)
=
$(d_ext)
)
exe_src_dep
:=
$(obj_dir)
/
$(exe_name)$(d_ext)
source_dependencies
:=
$(lc_src_dep)
$(exe_src_dep)
link_dependencies
:=
$(bld_dir)
/
$(exe_name)$(d_ld_ext)
clean_h_includes
:=
$(
patsubst
%.h,clean_%.h,
$(h_includes)
)
clean_hpp_includes
:=
$(
patsubst
%.hpp,clean_%.hpp,
$(hpp_includes)
)
.PHONY
:
all init copy lib exe clean realclean
\
dirs $(clean_includes) clean_bld clean_dirs
\
clean_exe
all
:
init copy lib exe
init
:
dirs
copy
:
$(export_includes)
lib
:
exe
:
$(l_targets) $(objects) $(export_obj) $(export_exe)
dirs
:
$(bld_dir)$(dir_ext)
$(bld_dir)$(dir_ext)
:
@
$(mkdir)
$(mkdirflags)
$(
basename
$@
)
clean
:
clean_exe clean_bld
realclean
:
clean $(clean_h_includes) $(clean_hpp_includes) clean_dirs
$(export_exe)
:
$(link_rule) $(export_obj) $(objects)
@
$(log_link_exe)
@
$(link)
clean_exe
:
@
if
[
-e
$(export_exe)
]
;
then
\
$(rm)
$(export_exe)
;
\
fi
@
if
[
-e
$(export_obj)
]
;
then
\
$(rm)
$(export_obj)
;
\
fi
clean_bld
:
@
$(rm)
$(rmflags)
$(bld_dir)
/
*
clean_dirs
:
@
$(rm)
$(rmflags)
$(bld_dir)
$(clean_h_includes)
:
clean_%.h : %.h
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.h
$(clean_hpp_includes)
:
clean_%.hpp : %.hpp
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.hpp
-include
$(source_dependencies)
-include
$(link_dependencies)
endif
src/tools/bld/src/os_macos/hw_x86_64/variables.mk
0 → 100644
View file @
2b336f90
# variables.mk -- variables common to all makefiles
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# <Description>
#
ifndef
variables_mk
variables_mk
:=
1
release_root
:=
$(pwre_broot)
/
$(os_name)
/
$(hw_name)
module_root
:=
$(release_root)
/
$(pwre_bmodule)
export_type
:=
$(export_type)
exe_dir
:=
$(module_root)
/exe
lib_dir
:=
$(module_root)
/lib
obj_dir
:=
$(module_root)
/obj
cnf_dir
:=
$(module_root)
/cnf
db_dir
:=
$(module_root)
/db
inc_dir
:=
$(module_root)
/inc
lis_dir
:=
$(module_root)
/lis
kit_dir
:=
$(module_root)
/kit
src_dir
:=
$(module_root)
/src
load_dir
:=
$(module_root)
/load
doc_dir
:=
$(release_root)
/exp/doc
elib_dir
:=
$(release_root)
/exp/lib
einc_dir
:=
$(release_root)
/exp/inc
eobj_dir
:=
$(release_root)
/exp/obj
eexe_dir
:=
$(release_root)
/exp/exe
bld_dir
:=
$(release_root)
/bld/
$(type_name)
/
$(comp_name)
tmp_dir
:=
$(release_root)
/tmp
c_ext
:=
.c
d_ext
:=
.d
d_ld_ext
:=
.d_ld
h_ext
:=
.h
lib_ext
:=
.a
obj_ext
:=
.o
map_ext
:=
.map
# Full names of source directories
fhw_source
:=
$(pwre_sroot)
/
$(type_name)
/
$(comp_name)
/src/
$(os_name)
/
$(hw_name)
fos_source
:=
$(pwre_sroot)
/
$(type_name)
/
$(comp_name)
/src/
$(os_name)
fco_source
:=
$(pwre_sroot)
/
$(type_name)
/
$(comp_name)
/src
# Relative names of source directories
hw_source
:=
.
os_source
:=
../
co_source
:=
../../
ifndef
pwre_lang
lang_dir
:=
$(exe_dir)
lang_bld_dir
:=
$(bld_dir)
else
ifeq
($(pwre_lang),en_us)
lang
:=
en
endif
ifeq
($(pwre_lang),sv_se)
lang
:=
sw
pwr_lang
:=
1
endif
lang_hw_source
:=
$(pwre_sroot)
/
$(type_name)
/
$(comp_name)
/
$(pwre_lang)
/
$(os_name)
/
$(hw_name)
lang_os_source
:=
$(pwre_sroot)
/
$(type_name)
/
$(comp_name)
/
$(pwre_lang)
/
$(os_name)
lang_co_source
:=
$(pwre_sroot)
/
$(type_name)
/
$(comp_name)
/
$(pwre_lang)
lang_dir
:=
$(exe_dir)
/
$(pwre_lang)
lang_bld_dir
:=
$(bld_dir)
/
$(pwre_lang)
endif
source
=
$<
sname
=
$(
notdir
$(
basename
$<
))
ssuff
=
$(
suffix
$<
)
sdir
=
$(
dir
$<
)
/
target
=
$@
tname
=
$(
notdir
$(
basename
$@
))
tsuff
=
$(
suffix
$@
)
tdir
=
$(
dir
$@
)
/
libobj
=
$(bld_dir)
/
$*$(obj_ext)
cobj
=
-c
-o
$(target)
clibobj
=
-c
-o
$(libobj)
rt_msg_objs
:=
$(obj_dir)
/pwr_msg_co.o
$(obj_dir)
/pwr_msg_rt.o
rs_msg_objs
:=
$(obj_dir)
/pwr_msg_rs.o
wb_msg_objs
:=
$(obj_dir)
/pwr_msg_wb.o
$(obj_dir)
/pwr_msg_ge.o
$(obj_dir)
/pwr_msg_flow.o
rt_msg_eobjs
:=
$(eobj_dir)
/pwr_msg_co.o
$(eobj_dir)
/pwr_msg_rt.o
rs_msg_eobjs
:=
$(eobj_dir)
/pwr_msg_rs.o
wb_msg_eobjs
:=
$(eobj_dir)
/pwr_msg_wb.o
$(eobj_dir)
/pwr_msg_ge.o
$(eobj_dir)
/pwr_msg_flow.o
# Configuration
#ifeq ($(pwre_conf_mysql),1)
# cmysql := -DPWRE_CONF_MYSQL=1
# linkmysql := -L/usr/lib/mysql -lmysqlclient
#else
# cmysql :=
# linkmysql :=
#endif
#ifeq ($(pwre_conf_gtk),1)
# cgtk := -DPWRE_CONF_GTK=1
# linkgtk := `pkg-config --libs gtk+-2.0`
#else
# cgtk :=
# linkgtk :=
#endif
#ifeq ($(pwre_conf_libusb),1)
# clibusb := -DPWRE_CONF_LIBUSB=1
# linklibusb := -lusb-1.0
#else
# clibusb :=
# linklibusb :=
#endif
log_done
=
#csetos := -DOS_LINUX=1 -DOS=linux -D_LINUX -DHW_X86=1 -DHW=x86
#cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \
`pkg-config
--cflags
gtk+-2.0`
-DPREFIX
=
\"
/usr/local
\"
-DSYSCONFDIR
=
\"
/etc
\"
-DDATADIR
=
\"
/usr/share
\"
-DLIBDIR
=
\"
/usr/lib
\"
$(cmysql)
$(cgtk)
$(clibusb)
csetos
:=
$(pwre_conf_cc_define)
cinc
:=
-I
$(inc_dir)
-I
$(einc_dir)
-I
$(hw_source)
-I
$(os_source)
-I
$(co_source)
$(pwre_conf_incdir)
$(pwre_conf_incdirgtk)
rm
:=
rm
cp
:=
cp
cpflags
:=
arflags
:=
r
obj
:=
-c
-o
$(target)
lex
:=
flex
javac
:=
javac
ifdef
pwre_ar
ar
:=
$(pwre_ar)
else
ar
:=
ar
endif
ifdef
pwre_cc
cc
:=
$(pwre_cc)
ld
:=
$(pwre_cc)
else
cc
:=
gcc
ld
:=
gcc
endif
ifdef
pwre_cxx
cxx
:=
$(pwre_cxx)
ldxx
:=
$(pwre_cxx)
else
cxx
:=
g++
ldxx
:=
g++
endif
ifdef
pwre_host_exe
tools_msg2cmsg
:=
$(pwre_host_exe)
/tools_msg2cmsg
tools_cmsg2c
:=
$(pwre_host_exe)
/tools_cmsg2c
tools_pdrgen
:=
$(pwre_host_exe)
/tools_pdrgen
wb_rtt
:=
$(pwre_host_exe)
/wb_rtt
co_convert
:=
$(pwre_host_exe)
/co_convert
co_merge
:=
$(pwre_host_exe)
/co_merge
else
tools_msg2cmsg
:=
$(eexe_dir)
/tools_msg2cmsg
tools_cmsg2c
:=
$(eexe_dir)
/tools_cmsg2c
tools_pdrgen
:=
$(eexe_dir)
/tools_pdrgen
wb_rtt
:=
$(eexe_dir)
/wb_rtt
co_convert
:=
$(eexe_dir)
/co_convert
co_merge
:=
$(eexe_dir)
/co_merge
endif
#docbook-related, added by jonas_h 2006-04-nn
#xsltproc := xsltproc
#fop := fop
#above is a symlink from /usr/local/bin/fop -> /usr/local/fop-0.92beta/fop
#xsltproc_args := --xinclude
#chunk_args_en_us = --stringparam root.filename $(basename $(notdir $(target))) --stringparam base.dir $(doc_dir)/en_us/
#chunk_args_sv_se = --stringparam root.filename $(basename $(notdir $(target))) --stringparam base.dir $(doc_dir)/sv_se/
#pwr_stylesheetdir = $(pwre_sroot)/doc/man/src
#docbook_stylesheetdir = /usr/local/share/xml/docbook/stylesheet/snapshot
#html_xsl = $(pwr_stylesheetdir)/pwrxsl-html.xsl
#chunk_xsl = $(pwr_stylesheetdir)/pwrxsl-chunk.xsl
#fo_xsl = $(pwr_stylesheetdir)/pwrxsl-fo.xsl
#end of
#list = $(to-vms $(lis_dir)/$(sname)$(lis_ext))
map
=
$(bld_dir)
/
$(tname)$(map_ext)
mkdir
:=
mkdir
# Set to /buildversion for frozen dbs versions
wblflags
:=
ifeq
($(pwre_btype),rls)
cflags
:=
-c
-O3
-D_GNU_SOURCE
-DPWR_NDEBUG
-D_REENTRANT
-fPIC
cxxflags
:=
$(cflags)
linkflags
:=
-O3
-L
$(lib_dir)
elinkflags
:=
-O3
-L
$(lib_dir)
-L
$(elib_dir)
explinkflags
:=
-g
-L
$(elib_dir)
clis
=
/lis
=
$(list)
dolist
=
/lis
=
$(list)
domap
=
else
cflags
:=
-c
-g
-Wall
-D_GNU_SOURCE
-D_REENTRANT
-fPIC
cxxflags
:=
$(cflags)
-Wno-deprecated
mmflags
:=
-Wno-deprecated
linkflags
:=
-g
-L
$(lib_dir)
$(pwre_conf_libdir)
elinkflags
:=
-g
-L
$(lib_dir)
-L
$(elib_dir)
$(pwre_conf_libdir)
explinkflags
:=
-g
-L
$(elib_dir)
$(pwre_conf_libdir)
dolist
=
/lis
=
$(list)
clis
:=
domap
=
endif
log_h_h
=
echo
"Exporting
$<
"
log_x_h
=
echo
"Exporting
$<
to
$(
notdir
$@
)
"
log_l_obj
=
echo
"Compiling
$<
"
log_l_lib
=
echo
"Compiling
$(
notdir
$(
basename
$@
))
(
$<
)"
#log_c_d = echo "Updating dependencies $<"
log_c_obj
=
echo
"Compiling
$<
"
log_c_lib
=
echo
"Compiling
$(
notdir
$(
basename
$@
))
(
$<
)"
log_x_lib
=
echo
"Compiling
$(
notdir
$(
basename
$@
))
(
$<
)"
log_obj_lib
=
echo
"Archiving lasse
$(
notdir
$(
basename
$@
))
(
$(
notdir
$<
)
)"
log_hlp_hlb
=
echo
"Exporting
$(
notdir
$(
basename
$@
))
(
$<
)"
log_sc_lib
=
echo
"Compiling
$(
notdir
$(
basename
$@
))
(
$<
)"
log_sc_obj
=
echo
"Compiling
$<
"
log_uil_uid
=
echo
"Compiling
$<
"
log_g_m1
=
echo
"Exporting
$<
"
log_cld_lib
=
echo
"Compiling
$(
notdir
$(
basename
$@
))
(
$<
)"
log_link_exe
=
echo
"Linking
$@
"
log_wb_load_wb_vers
=
echo
"Exporting
$<
"
log_xbm_xbm
=
echo
"Exporting
$<
"
log_frm_frm
=
echo
"Exporting
$<
"
log_graph_graph
=
echo
"Exporting
$<
"
log_msg_h
=
echo
"Compiling
$<
"
log_java_class
=
echo
"Compiling
$<
"
endif
src/tools/bld/src/os_macos/jpwr_generic.mk
0 → 100644
View file @
2b336f90
# lib_generic.mk -- generic makefile for libraries
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# To build a library.
#
ifndef
jpwr_generic_mk
jpwr_generic_mk
:=
1
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.java $(hw_source)
:
$(os_source):$(co_source)
vpath %.gif $(hw_source)
:
$(os_source):$(co_source)
vpath %.png $(hw_source)
:
$(os_source):$(co_source)
#VPATH = $(hw_source):$(os_source):$(co_source)
source_dirs
=
$(hw_source)
$(os_source)
$(co_source)
java_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.java
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
gif_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.gif
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
gif_exe_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
_
*
.gif
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
png_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.png
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
png_exe_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
_
*
.png
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
jpwr_name
:=
pwr_
$(comp_name)
export_lib
:=
$(lib_dir)
/
$(jpwr_name)
.jar
java_classes
:=
$(
addsuffix
.class,
$(
basename
$(local_java_sources)
))
gif_objects
:=
$(
addprefix
$(bld_dir)
/,
$(gif_sources)
)
gif_exe_objects
:=
$(
addprefix
$(exe_dir)
/,
$(gif_exe_sources)
)
png_objects
:=
$(
addprefix
$(bld_dir)
/,
$(png_sources)
)
png_exe_objects
:=
$(
addprefix
$(exe_dir)
/,
$(png_exe_sources)
)
java_objects
:=
$(
addprefix
$(bld_dir)
/,
$(java_classes)
)
objects
:=
$(gif_objects)
$(gif_exe_objects)
$(png_objects)
$(png_exe_objects)
$(java_objects)
source_dependencies
:=
$(
notdir
$(
basename
$(sources)
))
source_dependencies
:=
$(
addprefix
$(bld_dir)
/,
$(source_dependencies)
)
source_dependencies
:=
$(
addsuffix
$(d_ext)
,
$(source_dependencies)
)
.PHONY
:
all init copy lib exe clean realclean
\
dirs clean_includes
\
clean_bld clean_dirs clean_lib
# dirs $(clean_h_includes) $(clean_hpp_includes)
all
:
init copy lib exe
init
:
dirs
copy
:
lib
:
$(export_lib)
exe
:
dirs
:
$(bld_dir)$(dir_ext)
$(bld_dir)$(dir_ext)
:
@
$(mkdir)
$(mkdirflags)
$(
basename
$@
)
/
clean
:
clean_bld clean_lib
realclean
:
clean clean_includes clean_dirs
clean_bld
:
@
echo
"Cleaning build directory"
@
$(rm)
$(rmflags)
$(bld_dir)
/
*
clean_dirs
:
@
echo
"Removing build directory"
@
$(rm)
-r
$(rmflags)
$(bld_dir)
clean_lib
:
@
echo
"Removing archive
$(
notdir
$(export_lib)
)
"
@
$(rm)
$(rmflags)
$(export_lib)
clean_includes
:
$(clean_h_includes) $(clean_hpp_includes)
$(clean_h_includes)
:
clean_%.h : %.h
@
echo
"Removing h-includes"
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.h
$(clean_hpp_includes)
:
clean_%.hpp : %.hpp
@
echo
"Removing hpp-includes"
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.hpp
$(export_lib)
:
$(objects)
@
echo
"Building archive
$(
notdir
$(export_lib)
)
"
@
if
[
-e
$(export_lib)
]
;
then
\
$(rm)
$(export_lib)
;
\
fi
@
cd
$(pwre_broot)
/
$(pwre_target)
/bld
;
\
echo
"Inserting png and gif files"
;
\
jar cf
$(export_lib)
jpwr/
$(comp_name)
/
*
.gif
;
\
jar uf
$(export_lib)
jpwr/
$(comp_name)
/
*
.png
;
\
find jpwr/
$(comp_name)
-name
"*.class"
-exec
jar uf
$(export_lib)
{}
\;
;
# @ jar cvfm $(export_lib) ../../manifest.stub jpwr/$(comp_name)/*.class jpwr/$(comp_name)/*.gif
#-include $(source_dependencies)
endif
src/tools/bld/src/os_macos/lib_generic.mk
0 → 100644
View file @
2b336f90
# lib_generic.mk -- generic makefile for libraries
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# To build a library.
#
ifndef
lib_generic_mk
lib_generic_mk
:=
1
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
source_dirs
=
$(hw_source)
$(os_source)
$(co_source)
-include
../../lib_local.mk
-include
../lib_local.mk
-include
lib_local.mk
vpath %.h $(hw_source)
:
$(os_source):$(co_source)
vpath %.hpp $(hw_source)
:
$(os_source):$(co_source)
vpath %.c $(hw_source)
:
$(os_source):$(co_source)
vpath %.cpp $(hw_source)
:
$(os_source):$(co_source)
vpath %.x $(hw_source)
:
$(os_source):$(co_source)
vpath %.pdr $(hw_source)
:
$(os_source):$(co_source)
vpath %.java $(hw_source)
:
$(os_source):$(co_source)
vpath %.pwsg $(hw_source)
:
$(os_source):$(co_source)
vpath %.meth $(hw_source)
:
$(os_source):$(co_source)
source_dirs
=
$(hw_source)
$(os_source)
$(co_source)
sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.c
$(dir)
/
$(comp_name)
*
.cpp
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
h_includes
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.h
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
hpp_includes
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.hpp
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
xdr_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.x
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
pdr_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.pdr
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
java_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.java
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
pwsg_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.pwsg
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
meth_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.meth
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
xdr_includes
:=
$(
addprefix
$(inc_dir)
/,
$(
patsubst
%.x, %.h,
$(xdr_sources)
))
xdr_objects
:=
$(
patsubst
%.x, %_xdr.o,
$(xdr_sources)
)
pdr_includes
:=
$(
addprefix
$(inc_dir)
/,
$(
patsubst
%.pdr, %.h,
$(pdr_sources)
))
pdr_objects
:=
$(
patsubst
%.pdr, %_pdr.o,
$(pdr_sources)
)
export_includes
:=
$(
addprefix
$(inc_dir)
/,
$(h_includes)
$(hpp_includes)
)
export_includes
+=
$(xdr_includes)
$(pdr_includes)
export_pwsg
:=
$(
addprefix
$(exe_dir)
/,
$(pwsg_sources)
)
export_meth
:=
$(
addprefix
$(inc_dir)
/,
$(meth_sources)
)
clean_h_includes
:=
$(
patsubst
%.h,clean_%.h,
$(h_includes)
)
clean_hpp_includes
:=
$(
patsubst
%.hpp,clean_%.hpp,
$(hpp_includes)
)
lib_name
:=
libpwr_
$(comp_name)
ifneq
($(src_name),src)
lib_name
:=
libpwr_
$(comp_name)
_
$(src_name)
endif
export_lib
:=
$(lib_dir)
/
$(lib_name)$(lib_ext)
java_classes
:=
$(
addsuffix
.class,
$(
basename
$(java_sources)
))
objects
:=
$(
addsuffix
$(obj_ext)
,
$(
basename
$(sources)
))
objects
+=
$(xdr_objects)
$(pdr_objects)
objects
+=
$(java_classes)
objects
:=
$(
addprefix
$(bld_dir)
/,
$(objects)
)
source_dependencies
:=
$(
notdir
$(
basename
$(sources)
$(pdr_objects)
$(xdr_objects)
))
source_dependencies
:=
$(
addprefix
$(bld_dir)
/,
$(source_dependencies)
)
source_dependencies
:=
$(
addsuffix
$(d_ext)
,
$(source_dependencies)
)
.PHONY
:
all init copy lib exe $(l_copy) clean realclean
\
dirs clean_includes
\
clean_bld clean_dirs clean_lib $(l_clean_copy)
# dirs $(clean_h_includes) $(clean_hpp_includes)
all
:
init copy lib exe
init
:
dirs
copy
:
$(export_includes) $(l_copy) $(export_pwsg) $(export_meth)
lib
:
$(export_lib)
exe
:
echo
:
echo
$(source_dependencies)
dirs
:
$(bld_dir)$(dir_ext)
$(bld_dir)$(dir_ext)
:
@
$(mkdir)
$(mkdirflags)
$(
basename
$@
)
/
clean
:
clean_bld clean_lib
clean_copy
:
$(l_clean_copy)
realclean
:
clean clean_includes clean_pwsg clean_dirs
clean_bld
:
@
echo
"Cleaning build directory"
@
$(rm)
$(rmflags)
$(bld_dir)
/
*
clean_dirs
:
@
echo
"Removing build directory"
@
$(rm)
-r
$(rmflags)
$(bld_dir)
clean_lib
:
@
if
[
-e
$(export_lib)
]
;
then
\
echo
"Removing archive
$(
notdir
$(export_lib)
)
"
\
$(rm)
$(export_lib)
;
\
fi
clean_includes
:
$(clean_h_includes) $(clean_hpp_includes)
$(clean_h_includes)
:
clean_%.h : %.h
@
echo
"Removing h-include:
$(inc_dir)
/
$*
.h"
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.h
$(clean_hpp_includes)
:
clean_%.hpp : %.hpp
@
echo
"Removing hpp-include:
$(inc_dir)
/
$*
.hpp"
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.hpp
$(clean_pwsg)
:
clean_%.pwsg : %.pwsg
@
echo
"Removing pwsg:
$(exe_dir)
/
$*
.pwsg"
@
$(rm)
$(rmflags)
$(exe_dir)
/
$*
.pwsg
$(export_lib)
:
$(objects)
@
echo
"Building archive
$(
notdir
$(export_lib)
)
"
@
if
[
"
$(objects)
"
!=
""
]
;
then
\
$(ar)
-cr
$(export_lib)
$(objects)
;
\
fi
# @ if [ -e $(export_lib) ]; then \
# $(rm) $(export_lib); \
# fi
-include
$(source_dependencies)
endif
src/tools/bld/src/os_macos/link_rule_generic.mk
0 → 100644
View file @
2b336f90
ifndef
link_rule_mk
link_rule_mk
:=
1
link
=
$(ld)
$(elinkflags)
$(domap)
-o
$(export_exe)
\
$(export_obj)
$(objects)
$(rt_msg_objs)
\
$(pwre_conf_libpwrrt)
$(pwre_conf_lib)
endif
src/tools/bld/src/os_macos/mmi_generic.mk
0 → 100644
View file @
2b336f90
# mmi_generic.mk -- generic make file for building mmi components
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# <Description>
#
ifndef
mmi_generic_mk
mmi_generic_mk
:=
1
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.uil $(hw_source)
:
$(os_source):$(co_source)
vpath %.pwg $(hw_source)
:
$(os_source):$(co_source)
vpath %.pwsg $(hw_source)
:
$(os_source):$(co_source)
vpath %.png $(hw_source)
:
$(os_source):$(co_source)
source_dirs
:=
$(hw_source)
$(os_source)
$(co_source)
uil_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.uil
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
pwg_c_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/pwr_c_
*
.pwg
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
pwg_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.pwg
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
pwsg_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.pwsg
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
png_sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.png
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
export_uid
:=
$(
addprefix
$(exe_dir)
/,
$(
patsubst
%.uil, %.uid,
$(uil_sources)
))
export_c_pwg
:=
$(
addprefix
$(exe_dir)
/,
$(pwg_c_sources)
)
export_pwg
:=
$(
addprefix
$(exe_dir)
/,
$(pwg_sources)
)
export_pwsg
:=
$(
addprefix
$(exe_dir)
/,
$(pwsg_sources)
)
export_png
:=
$(
addprefix
$(exe_dir)
/,
$(png_sources)
)
$(exe_dir)/%.uid
:
%.uil
@
$(log_uil_uid)
@
export
LANG
;
uil
-o
$(target)
$(source)
clean_uid
:=
$(
patsubst
%.uil,clean_%.uid,
$(uil_sources)
)
clean_c_pwg
:=
$(
patsubst
%.pwg,clean_%.pwg,
$(pwg_c_sources)
)
clean_pwg
:=
$(
patsubst
%.pwg,clean_%.pwg,
$(pwg_sources)
)
clean_pwsg
:=
$(
patsubst
%.pwsg,clean_%.pwsg,
$(pwsg_sources)
)
clean_png
:=
$(
patsubst
%.png,clean_%.png,
$(png_sources)
)
.PHONY
:
all init copy lib exe clean realclean
\
dirs clean_bld clean_dirs $(clean_uid)
all
:
init copy
init
:
dirs
copy
:
$(export_uid) $(export_c_pwg) $(export_pwg) $(export_pwsg) $(export_png)
lib
:
exe
:
clean
:
$(clean_uid) $(clean_pwg) $(clean_pwsg) $(clean_png)
realclean
:
clean
dirs
:
$(clean_uid)
:
clean_%.uid : %.uil
@
echo
"Removing uid"
@
$(rm)
$(rmflags)
$(exe_dir)
/
$*
.uid
$(clean_pwg)
:
clean_%.pwg : %.pwg
@
echo
"Removing pwg"
@
$(rm)
$(rmflags)
$(exe_dir)
/
$*
.pwg
$(clean_c_pwg)
:
clean_%.pwg : %.pwg
@
echo
"Removing pwg"
@
$(rm)
$(rmflags)
$(exe_dir)
/
$*
.pwg
$(clean_pwsg)
:
clean_%.pwsg : %.pwsg
@
echo
"Removing pwsg"
@
$(rm)
$(rmflags)
$(exe_dir)
/
$*
.pwsg
$(clean_png)
:
clean_%.png : %.png
@
echo
"Removing png"
@
$(rm)
$(rmflags)
$(exe_dir)
/
$*
.png
endif
src/tools/bld/src/os_macos/msg_generic.mk
0 → 100644
View file @
2b336f90
# msg_generic.mk -- generic makefile for messages
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# To build a message file.
#
ifndef
msg_generic_mk
msg_generic_mk
:=
1
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.msg $(hw_source)
:
$(os_source):$(co_source)
source_dirs
=
$(hw_source)
$(os_source)
$(co_source)
sources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
$(comp_name)
*
.msg
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
export_includes
:=
$(
addprefix
$(inc_dir)
/,
$(
patsubst
%.msg, %.h,
$(sources)
))
clean_includes
:=
$(
patsubst
%.msg, clean_%.h,
$(sources)
)
cmsgs
:=
$(
addprefix
$(bld_dir)
/,
$(
basename
$(sources)
))
cmsgs
:=
$(
strip
$(
addsuffix
.cmsg,
$(cmsgs)
))
export_cmsg
=
$(obj_dir)
/pwr_msg_
$(comp_name)
.cmsg
export_obj
=
$(obj_dir)
/pwr_msg_
$(comp_name)$(obj_ext)
.PHONY
:
all init copy lib exe clean realclean
\
dirs $(clean_includes) clean_lib clean_obj clean_dirs
all
:
init copy lib
init
:
dirs
copy
:
$(export_includes) $(export_cmsg)
lib
:
$(export_obj)
exe
:
dirs
:
$(bld_dir)$(dir_ext)
$(bld_dir)$(dir_ext)
:
$(mkdir)
$(mkdirflags)
$(
basename
$@
)
clean
:
realclean
:
$(clean_includes) clean_obj clean_dirs
$(export_cmsg)
:
$(cmsgs)
@
echo
Creating: obj_dir/
$(
notdir
$@
)
@
cat
$(cmsgs)
>
$(export_cmsg)
$(export_obj)
:
$(export_cmsg)
clean_lib
:
@
$(rm)
$(rmflags)
$(export_lib)
clean_obj
:
@
$(rm)
$(rmflags)
$(export_obj)
$(clean_includes)
:
clean_%.h : %.msg
@
$(rm)
$(rmflags)
$(inc_dir)
/
$*
.h
clean_dirs
:
@
$(rmdir)
$(rmdirflags)
$(bld_dir)
endif
src/tools/bld/src/os_macos/rules.mk
0 → 100644
View file @
2b336f90
# rules.mk -- rules common for all makefiles
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# <Description>
#
ifndef
rules_mk
rules_mk
:=
1
ifndef
variables_mk
-include
$(pwre_sroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_sroot)/tools/bld/src/$(os_name)/variables.mk
endif
.SUFFIXES
:
$(bld_dir)/%.cmsg $(inc_dir)/%.h
:
%.msg
@
$(log_msg_h)
@
$(tools_msg2cmsg)
$(source)
$(bld_dir)
/
$(tname)
.cmsg
$(inc_dir)
/
$(tname)
.h
$(obj_dir)/%.cmsg $(inc_dir)/%.h
:
%.msg
@
$(log_msg_h)
@
$(tools_msg2cmsg)
$(source)
$(obj_dir)
/
$(tname)
.cmsg
$(inc_dir)
/
$(tname)
.h
$(obj_dir)/%.o
:
$(obj_dir)/%.cmsg
@
$(log_cmsg_obj)
@
$(tools_cmsg2c)
-b
$(comp_name)
$(source)
$(tmp_dir)
/
$(sname)
.c
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
$(cobj)
$(tmp_dir)
/
$(sname)
.c
$(bld_dir)/%.c
:
%.l
@
$(log_l_obj)
@
$(lex)
-o
$(bld_dir)
/
$(sname)
.c
$(source)
%.o
:
%.c
@
echo
"Warning, rule shall normally not be used: %.o : %.c"
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cc)
-MM
$(cinc)
$(csetos)
$(source)
\
| sed '
\'
's|
$(
notdir
$*
)
\.o[ ]*|
$(bld_dir)
/&|g'
\'
' >
$(bld_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
(%.o)
:
%.c
@
echo
"Error, rule shall not be used: (%.o) : %.c"
$(bld_dir)/%.o
:
%.c
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cc)
-MM
$(cinc)
$(csetos)
$(source)
\
| sed '
\'
's|$*\.o[ ]*|
$(bld_dir)
/&|g'
\'
' >
$(bld_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
$(bld_dir)/%.o
:
$(tmp_dir)/%.c
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cc)
-MM
$(cinc)
$(csetos)
$(source)
\
| sed '
\'
's|$*\.o[ ]*|
$(bld_dir)
/&|g'
\'
' >
$(bld_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
$(obj_dir)/%.o
:
%.c
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cc)
-MM
$(cinc)
$(csetos)
$(source)
\
| sed '
\'
's|$*\.o[ ]*|
$(obj_dir)
/&|g'
\'
' >
$(obj_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
%.o
:
%.cpp
@
echo
"Error, rule shall not be used: %.o : %.cpp"
(%.o)
:
%.cpp
@
echo
"Error, rule shall not be used: (%.o) : %.cpp"
$(bld_dir)/%.o
:
%.cpp
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cxx)
-MM
$(csetos)
$(mmflags)
$(cinc)
$(source)
\
| sed '
\'
's|$*\.o[ ]*|
$(bld_dir)
/&|g'
\'
' >
$(bld_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cxx)
$(cxxflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
$(bld_dir)/%.o
:
$(tmp_dir)/%.cpp
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cxx)
-MM
$(cinc)
$(csetos)
$(mmflags)
$(source)
\
| sed '
\'
's|$*\.o[ ]*|
$(bld_dir)
/&|g'
\'
' >
$(bld_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cxx)
$(cxxflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
$(obj_dir)/%.o
:
%.cpp
ifeq
($(nodep),)
@
$(log_c_d)
@
$(SHELL)
-ec
'
$(cxx)
-MM
$(cinc)
$(csetos)
$(mmflags)
$(source)
\
| sed '
\'
's|$*\.o[ ]*|
$(obj_dir)
/&|g'
\'
' >
$(obj_dir)
/
$(sname)
.d'
endif
@
$(log_c_obj)
@
$(cxx)
$(cxxflags)
$(csetos)
$(cinc)
$(cobj)
$(source)
$(inc_dir)/%.h
:
%.x
@
$(log_x_h)
@
if
[
-e
$(target)
]
;
then
\
$(rm)
$(target)
;
\
fi
@
rpcgen
-h
-o
$(target)
$(source)
$(bld_dir)/%_xdr.o
:
%.x
@
$(log_x_lib)
@
rpcgen
-c
-o
$(bld_dir)
/
$(sname)
_xdr.t
$(source)
@
sed
's/\(#include "\)\(.*
$(sname)
[^"]*\)/\1
$(sname)
.h/'
$(bld_dir)
/
$(sname)
_xdr.t
\
|
grep
-v
"register int32_t
\*
buf
\;
"
>
$(bld_dir)
/
$(sname)
_xdr.c
@
rm
$(bld_dir)
/
$(sname)
_xdr.t
ifeq
($(nodep),)
@
$(SHELL)
-ec
'
$(cc)
-MM
$(cinc)
$(csetos)
$(bld_dir)
/
$(sname)
_xdr.c \
| sed '
\'
's|$*_xdr\.o[ ]*|
$(bld_dir)
/&|g'
\'
' \
| sed '
\'
's|
$(bld_dir)
/
$(sname)
_xdr.c||'
\'
' >
$(bld_dir)
/
$(sname)
_xdr.d'
endif
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
-c
-o
$(bld_dir)
/
$(sname)
_xdr.o
$(bld_dir)
/
$(sname)
_xdr.c
@
mv
$(bld_dir)
/
$(sname)
_xdr.c
$(bld_dir)
/
$(sname)
_xdr_compiled.c
$(inc_dir)/%.h
:
%.pdr
@
$(log_x_h)
@
if
[
-e
$(target)
]
;
then
\
$(rm)
$(target)
;
\
fi
@
$(tools_pdrgen)
-h
-o
$(target)
$(source)
$(bld_dir)/%_pdr.o
:
%.pdr
@
$(log_x_lib)
@
$(tools_pdrgen)
-c
-o
$(bld_dir)
/
$(sname)
_pdr.c
$(source)
ifeq
($(nodep),)
@
$(SHELL)
-ec
'
$(cc)
-MM
$(cinc)
$(csetos)
$(bld_dir)
/
$(sname)
_pdr.c \
| sed '
\'
's|$*_pdr\.o[ ]*|
$(bld_dir)
/&|g'
\'
' \
| sed '
\'
's|
$(bld_dir)
/
$(sname)
_pdr.c||'
\'
' >
$(bld_dir)
/
$(sname)
_pdr.d'
endif
@
$(cc)
$(cflags)
$(csetos)
$(cinc)
-c
-o
$(bld_dir)
/
$(sname)
_pdr.o
$(bld_dir)
/
$(sname)
_pdr.c
@
mv
$(bld_dir)
/
$(sname)
_pdr.c
$(bld_dir)
/
$(sname)
_pdr_compiled.c
(%.o)
:
%.o
@
echo
"Error, rule shall not be used: (%.o) : %.o"
$(inc_dir)/%.h
:
%.h
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
@
chmod
u+w
$(target)
$(inc_dir)/%.hpp
:
%.hpp
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
@
chmod
u+w
$(target)
%.class
:
%.java
@
echo
"Warning, rule shall not be used: %.class : %.java"
$(bld_dir)/%.class
:
%.java
@
$(log_java_class)
@
$(javac)
-encoding
Latin1
-d
$(pwre_broot)
/
$(pwre_target)
/bld
$(source)
# @ $(javac) -Xlint:unchecked,deprecation -d $(pwre_broot)/$(pwre_target)/bld $(source)
$(bld_dir)/%.gif
:
%.gif
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(exe_dir)/%.gif
:
%.gif
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(doc_dir)/orm/%.gif
:
%.gif
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(doc_dir)/%.gif
:
%.gif
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(doc_dir)/sv_se/%.gif
:
%.gif
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(cnf_dir)/%.wb_vers
:
%.wb_load
@
$(log_wb_load_wb_vers)
@
wb_load
$(source)
$(lis_dir)
/
$(tname)
.wb_list
@
$(pwre_sroot)
/tools/com/src/
$(os_name)
/
$(hw_name)
/pwr_show_version.sh
$(source)
$(target)
$(exe_dir)/%.pwsg
:
%.pwsg
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(exe_dir)/%.pwg
:
%.pwg
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(bld_dir)/%.png
:
%.png
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(exe_dir)/%.png
:
%.png
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(exe_dir)/%.html
:
../../%.html
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(doc_dir)/%.html
:
../../%.html
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(inc_dir)/%.meth
:
%.meth
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
endif
src/tools/bld/src/os_macos/wbl_generic.mk
0 → 100644
View file @
2b336f90
# wbl_generic.mk -- generic make file for building wbl components
#
# PROVIEW/R
# Copyright (C) 1996 by Comator Process AB.
#
# <Description>
#
ifndef
wbl_generic_mk
wbl_generic_mk
:=
1
ifndef
variables_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/variables.mk
endif
ifndef
variables_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/variables.mk
endif
ifndef
rules_mk
-include
$(pwre_kroot)/tools/bld/src/$(os_name)/$(hw_name)/rules.mk
endif
ifndef
rules_mk
include
$(pwre_kroot)/tools/bld/src/$(os_name)/rules.mk
endif
vpath %.wb_load $(hw_source)
:
$(os_source):$(co_source)
source_dirs
:=
$(hw_source)
$(os_source)
$(co_source)
wblsources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.wb_load
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
flwsources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.flw
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
pdfsources
:=
$(
sort
\
$(
foreach
file,
\
$(
foreach
dir
,
\
$(source_dirs)
,
\
$(
wildcard
$(dir)
/
*
.pdf
)
\
)
,
$(
notdir
$(file)
)
\
)
\
)
wbl_sources
:=
$(
filter
%.wb_load,
$(wblsources)
)
flw_sources
:=
$(
filter
%.flw,
$(flwsources)
)
pdf_sources
:=
$(
filter
%.pdf,
$(pdfsources)
)
export_wbl
:=
$(
addprefix
$(load_dir)
/,
$(
patsubst
%.wb_load, %.dbs,
$(wbl_sources)
))
export_flw
:=
$(
patsubst
%.flw,
$(load_dir)
/%.flw,
$(flw_sources)
)
export_pdf_en_us
:=
$(
patsubst
%.pdf,
$(doc_dir)
/en_us/orm/%.pdf,
$(pdf_sources)
)
export_pdf_sv_se
:=
$(
patsubst
%.pdf,
$(doc_dir)
/sv_se/orm/%.pdf,
$(pdf_sources)
)
export_wbl_dbs
:=
$(
patsubst
%.wb_load,
$(load_dir)
/%.dbs,
$(wbl_sources)
)
export_wbl_h
:=
$(
patsubst
%.wb_load,
$(inc_dir)
/pwr_%classes.h,
$(wbl_sources)
)
export_wbl_hpp
:=
$(
patsubst
%.wb_load,
$(inc_dir)
/pwr_%classes.hpp,
$(wbl_sources)
)
export_wbl_xtthelp_en_us
:=
$(
patsubst
%.wb_load,
$(exe_dir)
/en_us/%_xtthelp.dat,
$(wbl_sources)
)
export_wbl_xtthelp_sv_se
:=
$(
patsubst
%.wb_load,
$(exe_dir)
/sv_se/%_xtthelp.dat,
$(wbl_sources)
)
export_wbl_html_en_us
:=
$(
patsubst
%.wb_load,
$(doc_dir)
/en_us/orm/%_allclasses.html,
$(wbl_sources)
)
export_wbl_html_sv_se
:=
$(
patsubst
%.wb_load,
$(doc_dir)
/sv_se/orm/%_allclasses.html,
$(wbl_sources)
)
export_wbl_ps_en_us
:=
$(
patsubst
%.wb_load,
$(doc_dir)
/en_us/%.ps,
$(wbl_sources)
)
export_wbl_ps_sv_se
:=
$(
patsubst
%.wb_load,
$(doc_dir)
/sv_se/%.ps,
$(wbl_sources)
)
clean_dbs
:=
$(
patsubst
%.wb_load,clean_%.dbs,
$(wbl_sources)
)
clean_h
:=
$(
patsubst
%.wb_load,clean_%.h,
$(wbl_sources)
)
clean_hpp
:=
$(
patsubst
%.wb_load,clean_%.hpp,
$(wbl_sources)
)
clean_xtthelp_sv_se
:=
$(
patsubst
%.wb_load,clean_%_sv_se.xtthelp,
$(wbl_sources)
)
clean_xtthelp_en_us
:=
$(
patsubst
%.wb_load,clean_%_en_us.xtthelp,
$(wbl_sources)
)
clean_html_sv_se
:=
$(
patsubst
%.wb_load,clean_%_sv_se.html,
$(wbl_sources)
)
clean_html_en_us
:=
$(
patsubst
%.wb_load,clean_%_en_us.html,
$(wbl_sources)
)
clean_ps_sv_se
:=
$(
patsubst
%.wb_load,clean_%_sv_se.ps,
$(wbl_sources)
)
clean_ps_en_us
:=
$(
patsubst
%.wb_load,clean_%_en_us.ps,
$(wbl_sources)
)
.SUFFIXES
:
$(load_dir)/%.dbs
:
../../%.wb_load
@
echo
"Generating loadfile for
$(source)
"
@
export
pwr_load
=
$(pwr_eload)
;
\
wb_cmd
-q
-i
create snapshot
$(wblflags)
/file
=
\"
$(source)
\"
/out
=
\"
$(target)
\"
@
chmod
a+w
$(target)
$(inc_dir)/pwr_%classes.h
:
../../%.wb_load
@
echo
"Generating struct files for
$(source)
classes..."
@
$(co_convert)
-so
-d
$(inc_dir)
"
$(source)
"
$(inc_dir)/pwr_%classes.hpp
:
../../%.wb_load
@
echo
"Generating hpp files for
$(source)
classes..."
@
$(co_convert)
-po
-d
$(inc_dir)
"
$(source)
"
$(doc_dir)/en_us/orm/%.pdf
:
../../%.pdf
@
echo
"Copy en_us
$(source)
"
@
$(cp)
$(cpflags)
$(source)
$(target)
$(doc_dir)/sv_se/orm/%.pdf
:
../../%.pdf
@
echo
"Copy sv_se
$(source)
"
@
$(cp)
$(cpflags)
$(source)
$(target)
$(doc_dir)/en_us/orm/%_allclasses.html
:
../../%.wb_load
@
echo
"Generating html files for
$(source)
classes en_us..."
@
$(co_convert)
-w
-d
$(doc_dir)
/en_us/orm
-g
$(pwre_sroot)
/wbl/mcomp/src/cnv_setup.dat
"
$(source)
"
@
$(co_convert)
-c
-d
$(doc_dir)
/en_us/orm
$(inc_dir)
/pwr_
$(pwre_module)
classes.h
@
$(co_convert)
-c
-d
$(doc_dir)
/en_us/orm
$(inc_dir)
/pwr_
$(pwre_module)
classes.hpp
@
$(co_convert)
-k
-d
$(doc_dir)
/en_us/orm
-l
en_us
$(doc_dir)/sv_se/orm/%_allclasses.html
:
../../%.wb_load
@
echo
"Generating html files for
$(source)
classes sv_se..."
@
$(co_convert)
-w
-l
sv_se
-d
$(doc_dir)
/sv_se/orm
-g
$(pwre_sroot)
/wbl/mcomp/src/cnv_setup.dat
"
$(source)
"
@
$(co_convert)
-c
-d
$(doc_dir)
/sv_se/orm
$(inc_dir)
/pwr_
$(pwre_module)
classes.h
@
$(co_convert)
-c
-d
$(doc_dir)
/sv_se/orm
$(inc_dir)
/pwr_
$(pwre_module)
classes.hpp
@
$(co_convert)
-k
-d
$(doc_dir)
/sv_se/orm
-l
sv_se
$(doc_dir)/en_us/%.ps
:
../../%.wb_load
@
echo
"Generating postscript file for
$(source)
classes en_us..."
@
$(co_convert)
-q
-l
en_us
-d
$(doc_dir)
/en_us
"
$(source)
"
$(doc_dir)/sv_se/%.ps
:
../../%.wb_load
@
echo
"Generating postscript file for
$(source)
classes sv_se..."
@
$(co_convert)
-q
-l
sv_se
-d
$(doc_dir)
/sv_se
"
$(source)
"
$(exe_dir)/en_us/%_xtthelp.dat
:
../../%.wb_load
@
echo
"Generating xtt help files for
$(source)
classes en_us"
@
$(co_convert)
-x
-d
$(exe_dir)
/en_us
"
$(source)
"
$(exe_dir)/sv_se/%_xtthelp.dat
:
../../%.wb_load
@
echo
"Generating xtt help files for
$(source)
classes sv_se"
@
$(co_convert)
-x
-l
sv_se
-d
$(exe_dir)
/sv_se
"
$(source)
"
$(exe_dir)/%.pwg
:
../../%.pwg
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(exe_dir)/%.pwsg
:
../../%.pwsg
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
$(load_dir)/%.flw
:
../../%.flw
@
$(log_h_h)
@
$(cp)
$(cpflags)
$(source)
$(target)
.PHONY
:
all init copy lib exe clean realclean
\
$(clean_wbl)
all
:
init copy exe
init
:
lib
:
$(export_wbl_dbs)
copy
:
$(export_wbl_h)
\
$(export_wbl_hpp)
\
$(export_pwg)
\
$(export_pwsg)
\
$(export_flw)
exe
:
$(export_wbl_xtthelp_en_us)
\
$(export_wbl_xtthelp_sv_se)
\
$(export_wbl_html_en_us)
\
$(export_wbl_html_sv_se)
\
$(export_wbl_ps_en_us)
\
$(export_wbl_ps_sv_se)
\
$(export_pdf_en_us)
\
$(export_pdf_sv_se)
clean
:
\
$(clean_xtthelp_sv_se) $(clean_xtthelp_en_us)
\
$(clean_html_sv_se) $(clean_html_en_us)
\
$(clean_ps_sv_se) $(clean_ps_en_us)
realclean
:
clean
\
$(clean_dbs)
\
$(clean_h)
\
$(clean_hpp)
\
$(clean_dbs)
:
clean_%.dbs : $(load_dir)/%.dbs
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_h)
:
clean_%.h : $(inc_dir)/pwr_%classes.h
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_hpp)
:
clean_%.hpp : $(inc_dir)/pwr_%classes.hpp
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_ps_sv_se)
:
clean_%_sv_se.ps : $(doc_dir)/sv_se/%.ps
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_ps_en_us)
:
clean_%_en_us.ps : $(doc_dir)/en_us/%.ps
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_html_sv_se)
:
clean_%_sv_se.html : $(doc_dir)/sv_se/orm/%_allclasses.html
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_html_en_us)
:
clean_%_en_us.html : $(doc_dir)/en_us/orm/%_allclasses.html
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_xtthelp_sv_se)
:
clean_%_sv_se.xtthelp : $(exe_dir)/sv_se/%_xtthelp.dat
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
$(clean_xtthelp_en_us)
:
clean_%_en_us.xtthelp : $(exe_dir)/en_us/%_xtthelp.dat
@
echo
"rm
$(source)
"
@
if
[
-e
$(source)
]
;
then
\
$(rm)
$(rmflags)
$(source)
;
\
fi
endif
src/tools/pwre/src/os_macos/dir_symbols.mk
0 → 100644
View file @
2b336f90
# dir_symbols.mk - get directory symbols
#
#
#
comma
:=
,
empty
:=
space
:=
$(empty)
$(empty)
pred_13
:=
12
pred_12
:=
11
pred_11
:=
10
pred_10
:=
9
pred_9
:=
8
pred_8
:=
7
pred_7
:=
6
pred_6
:=
5
pred_5
:=
4
pred_4
:=
3
pred_3
:=
2
pred_2
:=
1
pred_1
:=
0
cwd_dirs
:=
$(
subst
/,
$(space)
,
$(PWD)
)
cwd_dirs
:=
$(
subst
.hw_,hw_,
$(cwd_dirs)
)
cwd_dirs
:=
$(
subst
.os_,os_,
$(cwd_dirs)
)
word
:=
$(
words
$(cwd_dirs)
)
hw_name
:=
$(
word
$(word)
,
$(cwd_dirs)
)
ifneq
($(findstring hw, $(hw_name)),hw)
include
___error___hw
endif
prev
:=
pred_
$(word)
pred
:=
$(
subst
$(space)
,
$(empty)
,
$(prev)
)
word
:=
$
(
$(pred)
)
os_name
:=
$(
word
$(word)
,
$(cwd_dirs)
)
ifneq
($(findstring os,$(os_name)),os)
include
___error___os
endif
prev
:=
pred_
$(word)
pred
:=
$(
subst
$(space)
,
$(empty)
,
$(prev)
)
word
:=
$
(
$(pred)
)
src_name
:=
$(
word
$(word)
,
$(cwd_dirs)
)
#ifneq ($(src_name),src)
#include ___error___no_source_subdirectory
#endif
prev
:=
pred_
$(word)
pred
:=
$(
subst
$(space)
,
$(empty)
,
$(prev)
)
word
:=
$
(
$(pred)
)
comp_name
:=
$(
word
$(word)
,
$(cwd_dirs)
)
prev
:=
pred_
$(word)
pred
:=
$(
subst
$(space)
,
$(empty)
,
$(prev)
)
word
:=
$
(
$(pred)
)
type_name
:=
$(
word
$(word)
,
$(cwd_dirs)
)
prev
:=
pred_
$(word)
pred
:=
$(
subst
$(space)
,
$(empty)
,
$(prev)
)
word
:=
$
(
$(pred)
)
root_name
:=
$(
word
$(word)
,
$(cwd_dirs)
)
#ifneq ($(src_name),src)
#include ___error___incorrect_source_root1
#endif
#rest = /$(type_name)/$(comp_name)/src/$(os_name)/$(hw_name)/
#test_source_root := $(subst $(rest),$(empty),$(PWD))
#ifneq ($(pwre_sroot),$(test_source_root))
#include ___error___incorrect_source_root2
#endif
src/tools/pwre/src/os_macos/ebuild.dat
0 → 100644
View file @
2b336f90
bcomp 1
java 1
remote 1
nmps 1
sev 1
opc 1
profibus 1
otherio 1
ssabox 1
tlog 1
othermanu 1
abb 1
siemens 1
klocknermoeller 1
inor 1
telemecanique 1
\ No newline at end of file
src/tools/pwre/src/os_macos/hw_x86_64/import_dbs.sh
0 → 100755
View file @
2b336f90
#!/bin/bash
#
# Import loadfile
# Arg1 import base root
# Arg2 target base root
#
tst
=
`
eval echo
$1
|
grep
:
`
if
[
-z
$tst
]
;
then
# Local import root, use cp
copy
=
"cp"
else
# Remote import root, use scp
copy
=
"scp"
fi
$copy
$1
/exp/load/
*
.dbs
$2
/exp/load/
cp
-p
$2
/exp/load/pwrs.dbs
$2
/rt/load/
cp
-p
$2
/exp/load/pwrb.dbs
$2
/rt/load/
cp
-p
$2
/exp/load/rt.dbs
$2
/rt/load/
cp
-p
$2
/exp/load/basecomponent.dbs
$2
/bcomp/load/
cp
-p
$2
/exp/load/nmps.dbs
$2
/nmps/load/
cp
-p
$2
/exp/load/opc.dbs
$2
/opc/load/
cp
-p
$2
/exp/load/profibus.dbs
$2
/profibus/load/
cp
-p
$2
/exp/load/otherio.dbs
$2
/otherio/load/
cp
-p
$2
/exp/load/remote.dbs
$2
/remote/load/
cp
-p
$2
/exp/load/tlog.dbs
$2
/tlog/load/
cp
-p
$2
/exp/load/abb.dbs
$2
/abb/load/
cp
-p
$2
/exp/load/inor.dbs
$2
/inor/load/
cp
-p
$2
/exp/load/klocknermoeller.dbs
$2
/klocknermoeller/load/
cp
-p
$2
/exp/load/othermanufacturer.dbs
$2
/othermanu/load/
cp
-p
$2
/exp/load/siemens.dbs
$2
/siemens/load/
cp
-p
$2
/exp/load/ssabox.dbs
$2
/ssabox/load/
cp
-p
$2
/exp/load/telemecanique.dbs
$2
/telemecanique/load/
src/tools/pwre/src/os_macos/hw_x86_64/import_files.mk
0 → 100644
View file @
2b336f90
import_top
:
import_files
source
=
$<
target
=
$@
rt_modules
=
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/pwrs.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/pwrb.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/rt.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/basecomponent.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/nmps.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/opc.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/profibus.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/otherio.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/remote.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/tlog.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/abb.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/inor.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/klocknermoeller.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/othermanufacturer.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/siemens.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/ssabox.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/load/telemecanique.dbs
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/rt/inc/pwr_systemclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/rt/inc/pwr_systemclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/rt/inc/pwr_baseclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/rt/inc/pwr_baseclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/bcomp/inc/pwr_basecomponentclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/bcomp/inc/pwr_basecomponentclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/nmps/inc/pwr_nmpsclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/nmps/inc/pwr_nmpsclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/opc/inc/pwr_opcclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/opc/inc/pwr_opcclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/profibus/inc/pwr_profibusclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/profibus/inc/pwr_profibusclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/otherio/inc/pwr_otherioclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/otherio/inc/pwr_otherioclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/remote/inc/pwr_remoteclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/remote/inc/pwr_remoteclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/abb/inc/pwr_abbclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/abb/inc/pwr_abbclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/inor/inc/pwr_inorclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/inor/inc/pwr_inorclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/klocknermoeller/inc/pwr_klocknermoellerclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/klocknermoeller/inc/pwr_klocknermoellerclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/othermanu/inc/pwr_othermanufacturerclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/othermanu/inc/pwr_othermanufacturerclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/siemens/inc/pwr_siemensclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/siemens/inc/pwr_siemensclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/ssabox/inc/pwr_ssaboxclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/ssabox/inc/pwr_ssaboxclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/telemecanique/inc/pwr_telemecaniqueclasses.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/telemecanique/inc/pwr_telemecaniqueclasses.hpp
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/exe/wb_gcg.sh
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_ldh.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_vext.h
op_modules
=
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_wnav_selformat.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_nav.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_pal.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_palfile.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_wccm.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_log.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_trv.h
op_gtk_modules
=
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_nav_gtk.h
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_log_gtk.h
op_motif_modules
=
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/inc/wb_nav_motif.h
java_modules
=
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/lib/pwr_rt.jar
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/lib/pwr_jop.jar
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/lib/pwr_jopc.jar
\
$(pwre_broot)
/
$(pwre_os)
/
$(pwre_hw)
/exp/lib/pwr_rt_client.jar
import_files
:
$(rt_modules) $(op_modules) $(java_modules) $(op_gtk_modules)
@
echo
""
.PHONY
:
rt
.PHONY
:
op
.PHONY
:
java
_gtk
:
rt
:
$(rt_modules)
rt_gtk
:
rt_motif
:
op
:
$(op_modules)
op_gtk
:
$(op_gtk_modules)
op_motif
:
$(op_motif_modules)
java
:
$(java_modules)
java_gtk
:
java_motif
:
.SUFFIXES
:
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/load/%.dbs
:
$(pwre_vmsinc)/exp/load/%.dbs
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/rt/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/rt/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/bcomp/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/bcomp/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/nmps/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/nmps/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/opc/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/opc/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/profibus/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/profibus/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/otherio/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/otherio/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/remote/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/abb/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/inor/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/inor/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/klocknermoeller/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/klocknermoeller/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/othermanu/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/othermanu/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/siemens/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/siemens/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/ssabox/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/ssabox/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/telemecanique/inc/%.h
:
$(pwre_vmsinc)/exp/inc/%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/telemecanique/inc/%.hpp
:
$(pwre_vmsinc)/exp/inc/%.hpp
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/exe/%.sh
:
$(pwre_vmsinc)/exp/exe/%.sh
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/inc/wb_%_motif.h
:
$(pwre_croot)/wb/lib/wb/motif/wb_%_motif.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/inc/wb_%_gtk.h
:
$(pwre_croot)/wb/lib/wb/gtk/wb_%_gtk.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/inc/wb_%.h
:
$(pwre_croot)/wb/lib/wb/src/wb_%.h
@
echo
Import
${target}
@
cp
$(source)
$(target)
$(pwre_broot)/$(pwre_os)/$(pwre_hw)/exp/lib/%.jar
:
$(pwre_vmsinc)/exp/lib/%.jar
@
echo
Import
${target}
@
cp
$(source)
$(target)
src/tools/pwre/src/os_macos/pwre.pl
0 → 100755
View file @
2b336f90
#!/usr/bin/perl
#
# pwre.pl
#
%
verbs
=
(
"
add
",
"
add:usage_add
",
"
configure
",
"
configure:usage_configure
",
"
build
",
"
build:usage_build
",
"
build_all
",
"
build_all:usage_build_all
",
"
build_kernel
",
"
build_kernel:usage_build_kernel
",
"
build_all_modules
",
"
build_all_modules:usage_build_all_modules
",
"
build_all_wbl
",
"
build_all_wbl:usage_build_all_wbl
",
"
ebuild
",
"
ebuild:usage_ebuild
",
"
clean_exe_all
",
"
clean_exe_all:usage_clean_exe_all
",
"
method_build
",
"
method_build:usage_method_build
",
"
copy
",
"
copy:usage_copy
",
"
create
",
"
create:usage_create
",
"
create_all_modules
",
"
create_all_modules:usage_create_all_modules
",
"
delete
",
"
dele:usage_dele
",
"
help
",
"
help:usage_help
",
"
list
",
"
list:usage_list
",
"
init
",
"
init:usage_init
",
"
import
",
"
import:usage_import
",
"
module
",
"
module:usage_module
",
"
merge
",
"
merge:usage_merge
",
"
modify
",
"
modify:usage_modify
",
"
show
",
"
show:usage_show
",
"
tags
",
"
tags:usage_tags
",
"
_build
",
"
_build:
",
"
_exists
",
"
_exists:
",
"
_print
",
"
_print:
"
);
#
# Variables
#
$user
=
$ENV
{"
USER
"};
$label
=
$ENV
{"
pwre_env
"};
$sroot
=
"
/view/
$user
/vobs/pwr_src/src
";
$vmsinc
=
"";
$broot
=
"
/usr/users/
$user
/
$user
"
.
"
_dbg
";
$btype
=
"
dbg
";
$os
=
"
macos
";
if
(
$ENV
{"
pwre_hosttype
"}
eq
"
rs6000
")
{
$hw
=
"
ppc
";
}
else
{
if
(
$ENV
{"
pwre_hosttype
"}
eq
"
x86_64
")
{
$hw
=
"
x86_64
";
}
else
{
$hw
=
"
x86
";
}
}
$desc
=
$user
.
"
's environment
";
@vars
;
$varstr
;
if
((
$dbname
=
$ENV
{"
pwre_env_db
"})
eq
"")
{
$dbname
=
$ENV
{"
HOME
"}
.
"
/pwre/pwre
";
}
$os
=
substr
(
$ENV
{"
pwre_os
"},
3
,
100
);
$hw
=
substr
(
$ENV
{"
pwre_hw
"},
3
,
100
);
$configfile
=
$ENV
{"
pwre_broot
"}
.
"
/pwre_
"
.
$hw
.
"
_
"
.
$os
.
"
.cnf
";
$arg1
=
$ARGV
[
0
];
shift
;
if
(
$arg1
eq
"")
{
help
();
}
$amb
=
0
;
$found
=
0
;
@ambs
;
foreach
$key
(
sort
keys
(
%
verbs
))
{
if
(
$key
=~
/^$arg1/
)
{
if
(
$key
=~
/$arg1\b/
)
{
$amb
=
0
;
$found
=
1
;
(
$verb
,
$usage
)
=
split
(
/:/
,
$verbs
{
$key
});
last
;
}
push
(
@ambs
,
$key
);
if
(
$found
==
1
)
{
$amb
=
1
;
}
else
{
$found
=
1
;
(
$verb
,
$usage
)
=
split
(
/:/
,
$verbs
{
$key
});
}
}
}
if
(
$amb
==
1
)
{
printf
("
++
\n
++ Verb
\"
%s
\"
is ambigous
\n
",
$arg1
);
printf
("
++ Select one of:
");
foreach
(
@ambs
)
{
printf
("
%s
",
$_
);
}
print
("
\n
");
exit
1
;
}
elsif
(
$found
==
1
)
{
&
$verb
(
@ARGV
);
exit
0
;
}
else
{
help
();
exit
1
;
}
#
# Verb subroutines
#
# add()
#
sub
add
()
{
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
$label
=
$_
[
0
];
$varstr
=
$envdb
{
$label
};
if
(
$varstr
ne
"")
{
printf
("
++ Environment %s already exists
\n
",
$_
[
0
]);
}
else
{
get_vars
(
@_
);
update_db
();
}
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
}
#
# configure()
#
sub
configure
()
{
if
(
!
defined
(
$ENV
{"
pwre_env
"}))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
my
$fname
=
$ENV
{"
pwre_bin
"}
.
"
/pwre_configure.sh
";
system
(
$fname
);
}
#
# build()
#
sub
build
()
#
args
:
branch
,
subbranch
,
flavour
,
phase
{
if
(
!
defined
(
$ENV
{"
pwre_env
"}))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
if
(
!
-
e
$configfile
)
{
print
("
++ Environment is not configured!
\n
");
exit
1
;
}
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
read_vars
();
my
(
$branch
)
=
$_
[
0
];
if
(
!
defined
(
$branch
))
{
usage_build
();
exit
1
;
}
my
(
$subbranch
)
=
$_
[
1
];
if
(
!
defined
(
$subbranch
))
{
usage_build
();
exit
1
;
}
shift
(
@_
);
shift
(
@_
);
if
(
$_
[
0
]
eq
"")
{
$flavour
=
"
src
";
}
else
{
$flavour
=
$_
[
0
];
shift
(
@_
);
}
printf
("
--
\n
");
printf
("
-- Build
\n
");
printf
("
-- Branch.............: %s
\n
",
$branch
);
printf
("
-- Sub branch.........: %s
\n
",
$subbranch
);
printf
("
-- Sub branch flavour.: %s
\n
",
$flavour
);
printf
("
-- Args...............:
");
foreach
(
@_
)
{
printf
("
%s
",
$_
);
$ENV
{"
PWRE_ARGS
"}
=
$_
;
}
printf
("
\n
--
\n
");
_build
(
$branch
,
$subbranch
,
$flavour
,
@_
);
}
#
# build_kernel()
#
sub
build_kernel
#
args
:
flavour
{
my
$flavour
=
$_
[
0
];
_module
("
xtt
");
build_all
("
copy
",
$flavour
);
merge
();
_module
("
rt
");
build_all
("
copy
",
$flavour
);
merge
();
_module
("
wb
");
build_all
("
copy
",
$flavour
);
merge
();
_module
("
rt
");
build_all
("
lib
",
$flavour
);
merge
();
_module
("
xtt
");
build_all
("
lib
",
$flavour
);
merge
();
_module
("
wb
");
build_all
("
lib
",
$flavour
);
merge
();
_module
("
otherio
");
_build
("
exp
","
rt
","
src
","
copy
");
_build
("
lib
","
usbio_dummy
","
src
","
init lib
");
_build
("
lib
","
usb_dummy
","
src
","
init lib
");
merge
();
_module
("
xtt
");
build_all
("
exe
",
$flavour
);
merge
();
_module
("
wb
");
build_all
("
exe
",
$flavour
);
merge
();
_module
("
rt
");
build_all
("
exe
",
$flavour
);
merge
();
}
#
# ebuild()
#
sub
ebuild
#
args
:
pass
flavour
{
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
read_vars
();
my
$fname
=
$ENV
{"
pwre_bin
"}
.
"
/ebuild.dat
";
open
FILE
,
$fname
or
die
$!
;
my
$build_bcomp
=
0
;
my
$build_java
=
0
;
my
$build_remote
=
0
;
my
$build_nmps
=
0
;
my
$build_sev
=
0
;
my
$build_opc
=
0
;
my
$build_profibus
=
0
;
my
$build_otherio
=
0
;
my
$build_ssabox
=
0
;
my
$build_tlog
=
0
;
my
$build_othermanu
=
0
;
my
$build_abb
=
0
;
my
$build_siemens
=
0
;
my
$build_klocknermoeller
=
0
;
my
$build_inor
=
0
;
my
$build_telemecanique
=
0
;
printf
(
"
-- Building modules
\n
");
while
(
<
FILE
>
)
{
my
@value
=
split
(
'
',
$_
);
if
(
$value
[
0
]
eq
"
bcomp
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_bcomp
=
1
;
printf
(
"
-- bcomp
\n
");}
elsif
(
$value
[
0
]
eq
"
remote
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_remote
=
1
;
printf
(
"
-- remote
\n
");}
elsif
(
$value
[
0
]
eq
"
java
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_java
=
1
;
printf
(
"
-- java
\n
");}
elsif
(
$value
[
0
]
eq
"
nmps
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_nmps
=
1
;
printf
(
"
-- nmps
\n
");}
elsif
(
$value
[
0
]
eq
"
sev
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_sev
=
1
;
printf
(
"
-- sev
\n
");}
elsif
(
$value
[
0
]
eq
"
opc
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_opc
=
1
;
printf
(
"
-- opc
\n
");}
elsif
(
$value
[
0
]
eq
"
profibus
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_profibus
=
1
;
printf
(
"
-- profibus
\n
");}
elsif
(
$value
[
0
]
eq
"
otherio
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_otherio
=
1
;
printf
(
"
-- otherio
\n
");}
elsif
(
$value
[
0
]
eq
"
ssabox
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_ssabox
=
1
;
printf
(
"
-- ssabox
\n
");}
elsif
(
$value
[
0
]
eq
"
tlog
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_tlog
=
1
;
printf
(
"
-- tlog
\n
");}
elsif
(
$value
[
0
]
eq
"
othermanu
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_othermanu
=
1
;
printf
(
"
-- othermanu
\n
");}
elsif
(
$value
[
0
]
eq
"
abb
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_abb
=
1
;
printf
(
"
-- abb
\n
");}
elsif
(
$value
[
0
]
eq
"
siemens
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_siemens
=
1
;
printf
(
"
-- siemens
\n
");}
elsif
(
$value
[
0
]
eq
"
klocknermoeller
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_klocknermoeller
=
1
;
printf
(
"
-- klocknermoeller
\n
");}
elsif
(
$value
[
0
]
eq
"
inor
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_inor
=
1
;
printf
(
"
-- inor
\n
");}
elsif
(
$value
[
0
]
eq
"
telemecanique
"
&&
$value
[
1
]
eq
"
1
"
)
{
$build_telemecanique
=
1
;
printf
(
"
-- telemecanique
\n
");}
}
printf
(
"
\n
");
close
FILE
;
my
$pass
=
$_
[
0
];
my
$flavour
=
$_
[
1
];
if
(
$_
[
1
]
eq
"
motif
")
{
$flavour
=
"
motif
";
}
else
{
$flavour
=
"
gtk
";
}
if
(
$pass
eq
"
rt
"
)
{
_module
("
rt
");
_build
("
exp
",
"
inc
",
"
src
",
"
all
");
_build
("
exp
",
"
com
",
"
src
",
"
all
");
_build
("
tools/exe
",
"
*
",
"
src
",
"
all
");
merge
("
exe/tools_cmsg2c
");
merge
("
exe/tools_msg2cmsg
");
merge
("
exe/tools_pdrgen
");
_build
("
msg
",
"
*
",
"
src
",
"
all
");
_build
("
lib
",
"
rt
",
"
src
",
"
init copy
");
_build
("
lib
",
"
rt
",
$flavour
,
"
copy
");
_build
("
lib
",
"
co
",
"
src
",
"
init copy
");
_build
("
lib
",
"
co
",
$flavour
,
"
copy
");
_build
("
lib
",
"
dtt
",
"
src
",
"
init copy
");
_build
("
lib
",
"
statussrv
",
"
src
",
"
init copy
");
_build
("
lib
",
"
co
",
"
src
",
"
all
");
_build
("
lib
",
"
co
",
$flavour
,
"
all
");
_build
("
exe
",
"
co*
",
"
src
",
"
all
");
_build
("
exe
",
"
*
",
"
src
",
"
copy
");
_build
("
exp
",
"
stdsoap2
",
"
src
",
"
copy
");
_build
("
lib
",
"
rt
",
"
src
",
"
all
");
_build
("
lib
",
"
statussrv
",
"
src
",
"
all
");
_build
("
lib
",
"
msg_dummy
",
"
src
",
"
init copy lib
");
_build
("
exp
",
"
rt
",
"
src
",
"
all
");
_build
("
exe
",
"
wb_rtt
",
"
src
",
"
all
");
_build
("
lib
",
"
dtt
",
"
src
",
"
all
");
_build
("
exp
",
"
stdsoap2
",
"
src
",
"
all
");
_module
("
otherio
");
_build
("
exp
","
rt
","
src
","
copy
");
_build
("
lib
","
usbio_dummy
","
src
","
init lib
");
_build
("
lib
","
usb_dummy
","
src
","
init lib
");
merge
();
_module
("
rt
");
_build
("
exe
",
"
rt*
",
"
src
",
"
all
");
_build
("
exe
",
"
co*
",
$flavour
,
"
all
");
_build
("
exe
",
"
pwr_user
",
"
src
",
"
all
");
if
(
$build_nmps
==
1
)
{
merge
();
_module
("
nmps
");
_build
("
lib
",
"
nmps
",
"
src
",
"
all
");
merge
();
}
if
(
$build_bcomp
==
1
)
{
_module
("
profibus
");
merge
();
_module
("
bcomp
");
_build
("
lib
",
"
rt
",
"
src
",
"
all
");
merge
();
}
if
(
$build_ssabox
==
1
)
{
_module
("
ssabox
");
_build
("
lib
",
"
rt
",
"
src
",
"
all
");
_build
("
lib
",
"
ssabox
",
"
src
",
"
all
");
merge
();
}
if
(
$build_otherio
==
1
)
{
_module
("
otherio
");
_build
("
lib
",
"
rt
",
"
src
",
"
all
");
merge
();
}
if
(
$build_profibus
==
1
)
{
_module
("
profibus
");
_build
("
lib
",
"
rt
",
"
src
",
"
all
");
merge
();
}
if
(
$build_remote
==
1
)
{
_module
("
remote
");
_build
("
lib
",
"
remote
",
"
src
",
"
all
");
_build
("
exe
",
"
*
",
"
src
",
"
all
");
merge
();
}
if
(
$build_opc
==
1
)
{
_module
("
opc
");
_build
("
lib
",
"
opc
",
"
src
",
"
all
");
_build
("
exe
",
"
*
",
"
src
",
"
all
");
merge
();
}
if
(
$build_tlog
==
1
)
{
_module
("
tlog
");
_build
("
lib
",
"
tlog
",
"
src
",
"
all
");
merge
();
}
if
(
$build_java
==
1
)
{
_module
("
java
");
_build
("
exe
",
"
jpwr_rt_gdh
",
"
src
",
"
all
");
merge
();
}
if
(
$build_sev
==
1
)
{
_module
("
sev
");
_build
("
lib
",
"
sev
",
"
src
",
"
all
");
_build
("
exe
",
"
sev_server
",
"
src
",
"
all
");
merge
();
}
if
(
$build_abb
==
1
)
{
_module
("
abb
");
merge
();
}
if
(
$build_siemens
==
1
)
{
_module
("
siemens
");
merge
();
}
if
(
$build_othermanu
==
1
)
{
_module
("
othermanu
");
merge
();
}
if
(
$build_inor
==
1
)
{
_module
("
inor
");
merge
();
}
if
(
$build_klocknermoeller
==
1
)
{
_module
("
klocknermoeller
");
merge
();
}
if
(
$build_telemecanique
==
1
)
{
_module
("
telemecanique
");
merge
();
}
}
elsif
(
$pass
eq
"
op
"
)
{
_module
("
xtt
");
_build
("
lib
",
"
*
",
"
src
",
"
init copy
");
_build
("
lib
",
"
*
",
$flavour
,
"
copy
");
_build
("
exp
",
"
*
",
"
src
",
"
init copy
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
_build
("
mmi
",
"
*
",
$flavour
,
"
copy
");
_build
("
exe
",
"
*
",
"
src
",
"
copy
");
_build
("
lib
",
"
*
",
"
src
",
"
lib
");
_build
("
lib
",
"
*
",
$flavour
,
"
lib
");
_build
("
exp
",
"
*
",
"
src
",
"
lib
");
_build
("
exe
",
"
rt*
",
"
src
",
"
all
");
_build
("
exe
",
"
xtt*
",
"
src
",
"
all
");
_build
("
exe
",
"
co*
",
"
src
",
"
all
");
_build
("
exe
",
"
pwr*
",
"
src
",
"
all
");
_build
("
exe
",
"
rt*
",
$flavour
,
"
all
");
_build
("
exe
",
"
xtt*
",
$flavour
,
"
all
");
_build
("
exe
",
"
co*
",
$flavour
,
"
all
");
_build
("
exe
",
"
pwr*
",
$flavour
,
"
all
");
merge
();
if
(
$build_bcomp
==
1
)
{
_module
("
bcomp
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_profibus
==
1
)
{
_module
("
profibus
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
_build
("
lib
",
"
cow
",
"
src
",
"
init copy lib
");
_build
("
lib
",
"
cow
",
$flavour
,
"
init copy lib
");
_build
("
lib
",
"
xtt
",
"
src
",
"
init copy lib
");
_build
("
lib
",
"
xtt
",
$flavour
,
"
init copy lib
");
merge
();
}
if
(
$build_opc
==
1
)
{
_module
("
opc
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_otherio
==
1
)
{
_module
("
otherio
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_sev
==
1
)
{
_module
("
sev
");
_build
("
exe
",
"
sev_xtt
",
"
src
",
"
all
");
_build
("
exe
",
"
sev_xtt
",
$flavour
,
"
all
");
merge
();
}
if
(
$build_othermanu
==
1
)
{
_module
("
othermanu
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_abb
==
1
)
{
_module
("
abb
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_inor
==
1
)
{
_module
("
inor
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_siemens
==
1
)
{
_module
("
siemens
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_klocknermoeller
==
1
)
{
_module
("
klocknermoeller
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_ssabox
==
1
)
{
_module
("
ssabox
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
if
(
$build_telemecanique
==
1
)
{
_module
("
telemecanique
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
merge
();
}
method_build
(
"
rt_io_comm
",
$flavour
);
method_build
(
"
rt_xtt
",
$flavour
);
}
}
#
# import()
#
sub
import
()
{
my
$flavour
=
$_
[
1
];
if
(
$_
[
1
]
eq
"
motif
")
{
$flavour
=
"
motif
";
}
else
{
$flavour
=
"
gtk
";
}
my
(
$vmsinc
)
=
$ENV
{"
pwre_vmsinc
"};
if
(
$vmsinc
ne
""
)
{
copy
(
$_
[
0
],
$flavour
);
_module
("
rt
");
merge
();
_module
("
bcomp
");
merge
();
_module
("
nmps
");
merge
();
_module
("
opc
");
merge
();
_module
("
profibus
");
merge
();
_module
("
otherio
");
merge
();
_module
("
remote
");
merge
();
}
}
#
# build_all()
#
sub
build_all_modules
()
{
my
$flavour
=
$_
[
0
];
build_kernel
(
$flavour
);
_module
("
nmps
");
build_all
(
$flavour
);
merge
();
_module
("
tlog
");
build_all
(
$flavour
);
merge
();
_module
("
remote
");
build_all
(
$flavour
);
merge
();
_module
("
profibus
");
build_all
(
$flavour
);
merge
();
_module
("
bcomp
");
build_all
(
$flavour
);
merge
();
_module
("
java
");
build_all
(
$flavour
);
merge
();
_module
("
opc
");
build_all
(
$flavour
);
merge
();
_module
("
ssabox
");
build_all
(
$flavour
);
merge
();
_module
("
othermanu
");
build_all
(
$flavour
);
merge
();
_module
("
otherio
");
build_all
(
$flavour
);
merge
();
_module
("
sev
");
build_all
(
$flavour
);
merge
();
_module
("
abb
");
build_all
(
$flavour
);
merge
();
_module
("
siemens
");
build_all
(
$flavour
);
merge
();
_module
("
inor
");
build_all
(
$flavour
);
merge
();
_module
("
klocknermoeller
");
build_all
(
$flavour
);
merge
();
_module
("
telemecanique
");
build_all
(
$flavour
);
merge
();
method_build
(
$flavour
);
}
#
# clean_exe_all()
#
sub
clean_exe_all
()
{
_module
("
xtt
");
_build
("
exe
","
*
","
src
","
clean_exe
");
_module
("
rt
");
_build
("
exe
","
rt*
","
src
","
clean_exe
");
_build
("
exe
","
co*
","
src
","
clean_exe
");
_build
("
exe
","
wb*
","
src
","
clean_exe
");
_module
("
wb
");
_build
("
exe
","
*
","
src
","
clean_exe
");
_module
("
nmps
");
_build
("
exe
","
*
","
src
","
clean_exe
");
_module
("
tlog
");
_build
("
exe
","
*
","
src
","
clean_exe
");
_module
("
remote
");
_build
("
exe
","
*
","
src
","
clean_exe
");
_module
("
rt
");
}
#
# build_all_wbl()
#
sub
build_all_wbl
()
{
_module
("
rt
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
pwrs
",
"
src
",
"
lib
");
_build
("
wbl
",
"
pwrb
",
"
src
",
"
lib
");
_build
("
wbl
",
"
wb
",
"
src
",
"
lib
");
_build
("
wbl
",
"
rt
",
"
src
",
"
lib
");
merge
();
_module
("
nmps
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
nmps
",
"
src
",
"
lib
");
merge
();
_module
("
tlog
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
tlog
",
"
src
",
"
lib
");
merge
();
_module
("
profibus
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
opc
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
remote
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
remote
",
"
src
",
"
lib
");
merge
();
_module
("
bcomp
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
bcomp
",
"
src
",
"
lib
");
merge
();
_module
("
ssabox
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
abb
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
siemens
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
telemecanique
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
inor
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
klocknermoeller
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
othermanu
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
otherio
");
my
(
$load_dir
)
=
$ENV
{"
pwr_load
"};
system
(
"
rm
$load_dir
/*.dbs
");
_build
("
wbl
",
"
mcomp
",
"
src
",
"
lib
");
merge
();
_module
("
rt
");
}
sub
method_build
()
{
my
$flavour
;
my
$program
;
if
(
$_
[
0
]
eq
"
motif
"
||
$_
[
0
]
eq
"
gtk
")
{
$flavour
=
$_
[
0
];
}
else
{
$program
=
$_
[
0
];
$flavour
=
$_
[
1
];
}
if
(
!
defined
(
$program
))
{
printf
("
-- Relink method dependent programs
$flavour
");
_module
("
rt
");
$ENV
{"
export_type
"}
=
"
exp
";
my
(
$exe_dir
)
=
$ENV
{"
pwr_exe
"};
system
("
rm
$exe_dir
/rt_io_comm
");
_build
("
exe
",
"
rt_io_comm
",
"
src
",
"
all
");
# system("rm $exe_dir/rt_ini");
# _build("exe", "rt_ini", $flavour, "all");
merge
();
method_build
(
"
wb
",
$flavour
);
# _module("wb");
# my($exe_dir) = $ENV{"pwr_exe"};
# system("rm $exe_dir/wb");
# _build("exe", "wb", "src", "all");
# _build("exe", "wb", $flavour, "all");
# merge();
method_build
(
"
rt_xtt
",
$flavour
);
# _module("xtt");
# my($exe_dir) = $ENV{"pwr_exe"};
# system("rm $exe_dir/rt_xtt");
# _build("exe", "rt_xtt", "src", "all");
# _build("exe", "rt_xtt", $flavour, "all");
# merge();
}
if
(
$_
[
0
]
eq
"
rt_io_comm
"
)
{
printf
("
-- Method build
$program
");
_module
("
rt
");
$ENV
{"
export_type
"}
=
"
exp
";
my
(
$exe_dir
)
=
$ENV
{"
pwr_exe
"};
system
("
rm
$exe_dir
/rt_io_comm
");
_build
("
exe
",
"
rt_io_comm
",
"
src
",
"
all
");
merge
();
}
if
(
$_
[
0
]
eq
"
wb
"
)
{
printf
("
-- Method build
$program
$flavour
");
_module
("
wb
");
$ENV
{"
export_type
"}
=
"
exp
";
my
(
$exe_dir
)
=
$ENV
{"
pwr_exe
"};
system
("
rm
$exe_dir
/wb
");
_build
("
exe
",
"
wb
",
$flavour
,
"
all
");
_build
("
exe
",
"
wb
",
"
src
",
"
all
");
merge
();
}
if
(
$_
[
0
]
eq
"
rt_xtt
"
)
{
printf
("
-- Method build
$program
$flavour
");
_module
("
xtt
");
$ENV
{"
export_type
"}
=
"
exp
";
my
(
$exe_dir
)
=
$ENV
{"
pwr_exe
"};
system
("
rm
$exe_dir
/rt_xtt
");
_build
("
exe
",
"
rt_xtt
",
$flavour
,
"
all
");
_build
("
exe
",
"
rt_xtt
",
"
src
",
"
all
");
merge
();
}
}
sub
create_all_modules
()
{
if
(
!
-
e
$configfile
)
{
configure
();
}
_module
("
rt
");
create
();
_module
("
xtt
");
create
();
_module
("
wb
");
create
();
_module
("
nmps
");
create
();
_module
("
tlog
");
create
();
_module
("
remote
");
create
();
_module
("
java
");
create
();
_module
("
bcomp
");
create
();
_module
("
profibus
");
create
();
_module
("
sev
");
create
();
_module
("
opc
");
create
();
_module
("
ssabox
");
create
();
_module
("
othermanu
");
create
();
_module
("
otherio
");
create
();
_module
("
abb
");
create
();
_module
("
siemens
");
create
();
_module
("
inor
");
create
();
_module
("
klocknermoeller
");
create
();
_module
("
telemecanique
");
create
();
}
#
# build_all()
#
sub
build_all
()
{
$copy
=
0
;
$lib
=
0
;
$exe
=
0
;
if
(
$_
[
0
]
eq
"
copy
"
||
$_
[
1
]
eq
"
copy
"
||
$_
[
2
]
eq
"
copy
")
{
$copy
=
1
;
}
if
(
$_
[
0
]
eq
"
lib
"
||
$_
[
1
]
eq
"
lib
"
||
$_
[
2
]
eq
"
lib
")
{
$lib
=
1
;
}
if
(
$_
[
0
]
eq
"
exe
"
||
$_
[
1
]
eq
"
exe
"
||
$_
[
2
]
eq
"
exe
")
{
$exe
=
1
;
}
if
(
$copy
==
0
&&
$lib
==
0
&&
$exe
==
0
)
{
$copy
=
1
;
$lib
=
1
;
$exe
=
1
;
}
if
(
$_
[
0
]
eq
"
motif
"
||
$_
[
1
]
eq
"
motif
"
||
$_
[
2
]
eq
"
motif
"
||
$_
[
3
]
eq
"
motif
")
{
$flavour
=
"
motif
";
}
else
{
$flavour
=
"
gtk
";
}
if
(
!
defined
(
$ENV
{"
pwre_env
"}))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
my
(
$module
)
=
$ENV
{"
pwre_module
"};
my
(
$einc
)
=
$ENV
{"
pwr_einc
"};
my
(
$remoteclasses
)
=
$einc
.
"
/pwr_remoteclasses.h
";
my
(
$nmpsclasses
)
=
$einc
.
"
/pwr_nmpsclasses.h
";
printf
("
--
\n
");
printf
("
-- Build all
\n
");
show
();
if
(
$module
eq
"
rt
")
{
if
(
$copy
==
1
)
{
_build
("
exp
",
"
inc
",
"
src
",
"
all
");
_build
("
exp
",
"
com
",
"
src
",
"
all
");
_build
("
tools/exe
",
"
*
",
"
src
",
"
all
");
merge
("
exe/tools_cmsg2c
");
merge
("
exe/tools_msg2cmsg
");
merge
("
exe/tools_pdrgen
");
_build
("
msg
",
"
*
",
"
src
",
"
all
");
_build
("
lib
",
"
rt
",
"
src
",
"
init copy
");
_build
("
lib
",
"
co
",
"
src
",
"
init copy
");
_build
("
lib
",
"
dtt
",
"
src
",
"
init copy
");
_build
("
lib
",
"
statussrv
",
"
src
",
"
init copy
");
_build
("
lib
",
"
co
",
"
src
",
"
all
");
_build
("
exe
",
"
co*
",
"
src
",
"
all
");
_build
("
wbl
",
"
pwrs
",
"
src
",
"
copy
");
_build
("
wbl
",
"
pwrb
",
"
src
",
"
copy
");
_build
("
exe
",
"
*
",
"
src
",
"
copy
");
_build
("
exp
",
"
stdsoap2
",
"
src
",
"
copy
");
}
if
(
$lib
==
1
)
{
_build
("
lib
",
"
ge
",
"
all
");
if
(
!
-
e
$nmpsclasses
)
{
_module
("
nmps
");
_build
("
wbl
",
"
nmps
",
"
src
",
"
init copy
");
merge
("
inc/pwr_nmpsclasses.h
");
}
if
(
!
-
e
$remoteclasses
)
{
_module
("
remote
");
_build
("
wbl
",
"
remote
",
"
src
",
"
init copy
");
merge
("
inc/pwr_remoteclasses.h
");
}
_module
("
rt
");
_build
("
lib
",
"
rt
",
"
src
",
"
all
");
_build
("
exp
",
"
rt
",
"
src
",
"
all
");
_build
("
lib
",
"
msg_dummy
",
"
src
",
"
all
");
_build
("
exp
",
"
rt
",
"
src
",
"
all
");
_build
("
lib
",
"
statussrv
",
"
src
",
"
all
");
_build
("
exp
",
"
stdsoap2
",
"
src
",
"
all
");
}
if
(
$exe
==
1
)
{
_build
("
exe
",
"
wb_rtt
",
"
src
",
"
all
");
_build
("
lib
",
"
dtt
",
"
src
",
"
all
");
_build
("
exe
",
"
rt*
",
"
src
",
"
all
");
_build
("
exe
",
"
co*
",
$flavour
,
"
all
");
_build
("
exe
",
"
pwr_user
",
"
src
",
"
all
");
_build
("
exe
",
"
pwr_rtmon
",
"
src
",
"
all
");
_build
("
exe
",
"
pwr_rtmon
",
"
$flavour
",
"
all
");
_build
("
exp
",
"
ge
",
"
src
",
"
all
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
_build
("
mmi
",
"
*
",
$flavour
,
"
copy
");
_build
("
wbl
",
"
pwrs
",
"
src
",
"
lib
");
_build
("
wbl
",
"
pwrb
",
"
src
",
"
lib
");
_build
("
wbl
",
"
wb
",
"
src
",
"
lib
");
_build
("
wbl
",
"
rt
",
"
src
",
"
lib
");
_build
("
doc
",
"
web
",
"
src
",
"
all
");
_build
("
doc
",
"
dweb
",
"
src
",
"
all
");
_build
("
doc
",
"
orm
",
"
src
",
"
all
");
_build
("
doc
",
"
prm
",
"
src
",
"
all
");
_build
("
doc
",
"
man
",
"
src
",
"
all
");
_build
("
doc
",
"
dox
",
"
src
",
"
all
");
_build
("
wbl
",
"
pwrs
",
"
src
",
"
exe
");
_build
("
wbl
",
"
pwrb
",
"
src
",
"
exe
");
}
}
elsif
(
$module
eq
"
java
")
{
if
(
$lib
==
1
)
{
_build
("
jpwr
",
"
rt
",
"
src
",
"
all
");
_build
("
jpwr
",
"
jop
",
"
src
",
"
all
");
_build
("
jpwr
",
"
jopc
",
"
src
",
"
all
");
_build
("
jpwr
",
"
beans
",
"
src
",
"
all
");
_build
("
jpwr
",
"
rt_client
",
"
src
",
"
all
");
}
if
(
$exe
==
1
)
{
_build
("
exe
",
"
jpwr_rt_gdh
",
"
src
",
"
all
");
}
}
else
{
if
(
$copy
==
1
)
{
_build
("
wbl
",
"
*
",
"
src
",
"
copy
");
_build
("
lib
",
"
*
",
"
src
",
"
init copy
");
_build
("
lib
",
"
*
",
$flavour
,
"
copy
");
_build
("
exp
",
"
*
",
"
src
",
"
init copy
");
_build
("
mmi
",
"
*
",
"
src
",
"
copy
");
_build
("
mmi
",
"
*
",
$flavour
,
"
copy
");
_build
("
exe
",
"
*
",
"
src
",
"
copy
");
}
if
(
$lib
==
1
)
{
_build
("
lib
",
"
*
",
"
src
",
"
lib
");
_build
("
lib
",
"
*
",
$flavour
,
"
lib
");
_build
("
exp
",
"
*
",
"
src
",
"
lib
");
}
if
(
$exe
==
1
)
{
_build
("
wbl
",
"
*
",
"
src
",
"
lib
");
_build
("
wbl
",
"
*
",
"
src
",
"
exe
");
_build
("
exe
",
"
*
",
"
src
",
"
all
");
_build
("
exe
",
"
*
",
$flavour
,
"
all
");
_build
("
doc
",
"
dsh
",
"
src
",
"
copy
");
_build
("
doc
",
"
orm
",
"
src
",
"
copy
");
}
}
}
#
# copy()
#
sub
copy
()
{
if
(
!
defined
(
$ENV
{"
pwre_env
"}))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
my
(
$vmsinc
)
=
$ENV
{"
pwre_vmsinc
"};
my
(
$bindir
)
=
$ENV
{"
pwre_bin
"}
.
"
/
"
.
$ENV
{"
pwre_hw
"};
my
(
$docroot
)
=
$ENV
{"
pwre_broot
"}
.
"
/
"
.
$ENV
{"
pwre_os
"}
.
"
/
"
.
$ENV
{"
pwre_hw
"}
.
"
/exp/doc/
";
my
(
$exproot
)
=
$ENV
{"
pwre_broot
"}
.
"
/
"
.
$ENV
{"
pwre_os
"}
.
"
/
"
.
$ENV
{"
pwre_hw
"};
printf
("
--
\n
");
printf
("
-- Copy file from Import root
\n
");
printf
("
-- Import root: %s
\n
",
$vmsinc
);
printf
("
--
\n
");
if
(
$_
[
0
]
eq
"
doc
"
)
{
my
(
$cmd
)
=
"
cp -r
"
.
$vmsinc
.
"
/exp/doc/*
"
.
$docroot
;
system
("
$cmd
");
}
elsif
(
$_
[
0
]
eq
"
dbs
"
)
{
my
(
$cmd
)
=
"
$bindir
/import_dbs.sh
"
.
$vmsinc
.
"
"
.
$exproot
;
system
("
$cmd
");
}
else
{
my
(
$cmd
)
=
"
make -f
$bindir
/import_files.mk
"
.
"
"
.
$_
[
0
];
system
("
$cmd
");
my
$flavour
=
$_
[
1
];
if
(
$_
[
1
]
eq
"
motif
")
{
$flavour
=
"
motif
";
}
else
{
$flavour
=
"
gtk
";
}
my
(
$cmd
)
=
"
make -f
$bindir
/import_files.mk
"
.
"
"
.
$_
[
0
]
.
"
_
"
.
$flavour
;
system
("
$cmd
");
}
}
#
# create
#
sub
create
()
{
my
(
$newdir
);
my
(
$root
)
=
$ENV
{"
pwre_broot
"};
my
(
$module
)
=
$ENV
{"
pwre_bmodule
"};
if
(
!
defined
(
$root
))
{
printf
("
++
\n
++ No build root is defined
\n
");
exit
1
;
}
create_dir
(
$root
);
$root
.=
"
/
"
.
$ENV
{"
pwre_os
"};
create_dir
(
$root
);
$root
.=
"
/
"
.
$ENV
{"
pwre_hw
"};
create_dir
(
$root
);
$newdir
=
$root
.
"
/bld
";
create_dir
(
$newdir
);
create_dir
(
$newdir
.
"
/exe
");
create_dir
(
$newdir
.
"
/lib
");
create_dir
(
$newdir
.
"
/msg
");
create_dir
(
$newdir
.
"
/jpwr
");
create_dir
(
$newdir
.
"
/wbl
");
if
(
$module
eq
"
rt
")
{
$newdir
=
$root
.
"
/exp
";
create_base
(
$newdir
);
}
# else {
$newdir
=
$root
.
"
/
$module
";
create_base
(
$newdir
);
# }
$newdir
=
$root
.
"
/tmp
";
create_dir
(
$newdir
);
}
#
# dele()
#
sub
dele
()
{
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
$label
=
$_
[
0
];
if
(
defined
(
$envdb
{
$label
}))
{
print
("
-- Delete environment
\"
$label
\"
[n]?
");
my
(
$tmp
);
chomp
(
$tmp
=
<
STDIN
>
);
if
(
$tmp
=~
/^[yY]/
)
{
delete
$envdb
{
$label
};
printf
("
-- Environment
\"
%s
\"
has been deleted
\n
",
$label
);
}
}
else
{
printf
("
++ Environment
\"
%s
\"
doesn't exists
\n
",
$label
);
}
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
}
#
# help
#
sub
help
()
{
my
(
$key
);
printf
("
++
\n
");
printf
("
++ Usage: pwre verb [...]
\n
");
printf
("
++ A verb name may be shortned as long as it isn't ambiguos, eg. pwre h[elp]
\n
");
printf
("
++ Verbs:
\n
");
foreach
$key
(
sort
keys
(
%
verbs
))
{
(
$verb
,
$usage
)
=
split
(
/:/
,
$verbs
{
$key
});
if
(
!
(
$verb
=~
/^_/
))
{
&
$usage
();
}
}
printf
("
++
\n
");
exit
1
;
}
#
# list()
#
sub
list
()
{
my
(
$env
);
printf
("
Using Database:%s
\n
",
$dbname
);
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
print
("
-- Defined environments:
\n
");
foreach
$env
(
sort
keys
(
%
envdb
))
{
$varstr
=
$envdb
{
$env
};
(
$sroot
,
$vmsinc
,
$broot
,
$btype
,
$os
,
$hw
,
$desc
)
=
split
(
/:/
,
$varstr
);
@vars
=
(
$sroot
,
$vmsinc
,
$broot
,
$btype
,
$os
,
$hw
,
$desc
);
printf
("
%s %s
\n
",
$env
,
$desc
);
}
print
("
--
\n
");
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
}
#
# modify()
#
sub
modify
()
{
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
$label
=
$_
[
0
];
$varstr
=
$envdb
{
$label
};
if
(
$varstr
ne
"")
{
read_vars
();
get_vars
();
update_db
();
}
else
{
printf
("
Environment %s doesn't exists
\n
",
$label
);
}
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
}
#
# show
#
sub
show
()
{
if
(
$_
[
0
]
ne
"")
{
$label
=
$_
[
0
];
}
else
{
$label
=
$ENV
{"
pwre_env
"};
if
(
!
defined
(
$label
))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
}
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
read_vars
();
if
(
$varstr
ne
"")
{
print
("
--
\n
");
printf
("
-- Environment : %s
\n
",
$label
);
show_vars
();
print
("
--
\n
");
}
else
{
printf
("
++ Environment %s doesn't exists
\n
",
$label
);
}
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
}
#
# tags()
#
sub
tags
()
{
if
(
!
defined
(
$ENV
{"
pwre_env
"}))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
printf
("
--
\n
");
printf
("
-- Creating a CRiSP tag-file named ~/pwre/tags
\n
");
system
("
pwr_tags
")
&&
exit
;
}
#
# _build()
#
sub
_build
()
#
args
:
branch
,
subbranch
,
flavour
,
phase
{
my
(
$branch
)
=
$_
[
0
];
if
(
!
defined
(
$branch
))
{
usage_build
();
exit
1
;
}
my
(
$subbranch
)
=
$_
[
1
];
if
(
!
defined
(
$subbranch
))
{
usage_build
();
exit
1
;
}
my
(
$flavour
)
=
$_
[
2
];
shift
(
@_
);
shift
(
@_
);
shift
(
@_
);
my
(
$grepstr
)
=
$ENV
{"
pwre_target
"};
my
(
$globstr
)
=
$ENV
{"
pwre_sroot
"}
.
"
/
$branch
";
my
(
@dirs1
)
=
glob
(
$globstr
);
my
(
$dir1
);
my
(
@dirs2
);
my
(
$dir2
);
my
(
@mfiles
);
my
(
$globstr1
);
my
(
$globstr2
);
my
(
$globstr3
);
foreach
$dir1
(
@dirs1
)
{
# $globstr = "$dir1" . "/$subbranch/$flavour/os_$os/hw_$hw";
# if ( ! -e $globstr ) {
# $globstr = "$dir1" . "/$subbranch/$flavour/os_$os/.hw_$hw";
# if ( ! -e $globstr ) {
# $globstr = "$dir1" . "/$subbranch/$flavour/.os_$os/.hw_$hw";
# }
# }
$globstr1
=
"
$dir1
"
.
"
/
$subbranch
/
$flavour
/os_
$os
/hw_
$hw
";
$globstr2
=
"
$dir1
"
.
"
/
$subbranch
/
$flavour
/os_
$os
/.hw_
$hw
";
$globstr3
=
"
$dir1
"
.
"
/
$subbranch
/
$flavour
/.os_
$os
/.hw_
$hw
";
@dirs2
=
(
glob
(
$globstr1
),
glob
(
$globstr2
),
glob
(
$globstr3
));
foreach
$dir2
(
@dirs2
)
{
if
(
-
d
$dir2
)
{
@mfiles
=
`
find
$dir2
-name makefile
`;
foreach
(
@mfiles
)
{
chomp
(
$_
);
$_
=~
s#/makefile##
;
print
("
\n
$_
\n
");
chdir
(
$_
)
||
die
"
cannot cd to
$_
($!)
";
$ENV
{"
PWD
"}
=
$_
;
system
("
make
@_
")
&&
exit
1
;
}
}
}
}
}
#
# merge()
#
sub
merge
()
{
if
(
!
defined
(
$ENV
{"
pwre_env
"}))
{
print
("
++ Environment is not initialized!
\n
");
exit
1
;
}
my
(
$eroot
)
=
$ENV
{"
pwre_broot
"};
if
(
!
defined
(
$eroot
))
{
printf
("
++
\n
++ No build root is defined
\n
");
exit
1
;
}
my
(
$file
)
=
$_
[
0
];
# if ($module eq "rt") {
# printf("++\n++ No merge for module rt needed\n");
# exit 1;
# }
$eroot
.=
"
/
"
.
$ENV
{"
pwre_os
"};
$eroot
.=
"
/
"
.
$ENV
{"
pwre_hw
"};
my
(
$mroot
)
=
$eroot
;
$mroot
.=
"
/
"
.
$ENV
{"
pwre_module
"};
$eroot
.=
"
/exp
";
printf
("
--
\n
");
printf
("
-- Merge %s %s
\n
",
$module
,
$file
);
my
(
$cmd
)
=
$ENV
{
pwre_bin
}
.
"
/pwre_merge.sh
"
.
$mroot
.
"
"
.
$eroot
.
"
"
.
$file
;
system
("
$cmd
");
}
#
# _exists()
#
sub
_exists
()
{
my
(
$ret
)
=
1
;
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
$label
=
$_
[
0
];
if
(
defined
(
$envdb
{
$label
}))
{
$ret
=
0
;
}
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
exit
$ret
;
}
#
# _print()
#
sub
_print
()
{
use
DB_File
;
tie
(
%
envdb
,
"
DB_File
",
$dbname
,
O_CREAT
|
O_RDWR
,
0644
)
||
die
"
++ can't tie
$dbname
!
";
$label
=
$_
[
0
];
read_vars
();
if
(
$varstr
ne
"")
{
foreach
(
@vars
)
{
if
(
$_
eq
"")
{
printf
("
\"\"\n
");
}
else
{
printf
("
%s
\n
",
$_
);
}
}
}
else
{
printf
("
++ Environment %s doesn't exists
\n
",
$label
);
}
untie
(
%
envdb
)
||
die
"
++ can't untie
$dbname
!
";
}
sub
_module
()
{
my
(
$modu
)
=
$_
[
0
];
my
(
$sroot
)
=
$ENV
{"
pwre_sroot
"};
my
(
$idx
)
=
rindex
(
$sroot
,"
/
");
$sroot
=
substr
(
$sroot
,
0
,
$idx
);
my
(
$broot
)
=
$ENV
{"
pwre_broot
"}
.
"
/
"
.
$ENV
{"
pwre_os
"}
.
"
/
"
.
$ENV
{"
pwre_hw
"};
$ENV
{"
pwre_module
"}
=
$modu
;
$ENV
{"
pwre_bmodule
"}
=
$modu
;
if
(
$modu
eq
"
rt
")
{
# $ENV{"pwre_bmodule"} = "exp";
$ENV
{"
pwre_sroot
"}
=
$sroot
.
"
/src
";
}
else
{
$ENV
{"
pwre_sroot
"}
=
$sroot
.
"
/
"
.
$modu
;
}
$ENV
{"
pwr_exe
"}
=
$broot
.
"
/
"
.
$ENV
{"
pwre_bmodule
"}
.
"
/exe
";
$ENV
{"
pwr_inc
"}
=
$broot
.
"
/
"
.
$ENV
{"
pwre_bmodule
"}
.
"
/inc
";
$ENV
{"
pwr_load
"}
=
$broot
.
"
/
"
.
$ENV
{"
pwre_bmodule
"}
.
"
/load
";
$ENV
{"
pwr_lib
"}
=
$broot
.
"
/
"
.
$ENV
{"
pwre_bmodule
"}
.
"
/lib
";
$ENV
{"
pwr_lis
"}
=
$broot
.
"
/
"
.
$ENV
{"
pwre_bmodule
"}
.
"
/lis
";
$ENV
{"
pwr_obj
"}
=
$broot
.
"
/
"
.
$ENV
{"
pwre_bmodule
"}
.
"
/obj
";
$ENV
{"
pwr_doc
"}
=
$broot
.
"
/
"
.
"
exp
"
.
"
/doc
";
}
#
# Misc. subroutines
#
sub
create_base
()
{
my
(
$newdir
)
=
$_
[
0
];
create_dir
(
$newdir
);
create_dir
(
$newdir
.
"
/db
");
create_dir
(
$newdir
.
"
/exe
");
create_dir
(
$newdir
.
"
/exe/sv_se
");
create_dir
(
$newdir
.
"
/exe/en_us
");
create_dir
(
$newdir
.
"
/exe/de_de
");
create_dir
(
$newdir
.
"
/inc
");
create_dir
(
$newdir
.
"
/load
");
create_dir
(
$newdir
.
"
/lib
");
create_dir
(
$newdir
.
"
/lis
");
create_dir
(
$newdir
.
"
/obj
");
create_dir
(
$newdir
.
"
/src
");
create_dir
(
$newdir
.
"
/cnf
");
create_dir
(
$newdir
.
"
/doc
");
create_dir
(
$newdir
.
"
/doc/dox
");
create_dir
(
$newdir
.
"
/doc/prm
");
create_dir
(
$newdir
.
"
/doc/sv_se
");
create_dir
(
$newdir
.
"
/doc/en_us
");
create_dir
(
$newdir
.
"
/doc/sv_se/orm
");
create_dir
(
$newdir
.
"
/doc/en_us/orm
");
create_dir
(
$newdir
.
"
/doc/sv_se/dsh
");
create_dir
(
$newdir
.
"
/doc/en_us/dsh
");
create_dir
(
$newdir
.
"
/doc/help
");
}
sub
create_dir
()
{
my
(
$dir
)
=
$_
[
0
];
if
(
!
chdir
(
$dir
))
{
if
(
mkdir
(
$dir
,
0775
))
{
printf
("
-- mkdir: %s
\n
",
$dir
);
}
else
{
printf
("
++
\n
++ Cannot mkdir %s, reason: %s
\n
",
$dir
,
$!
);
exit
1
;
}
}
}
sub
get_vars
()
{
printf
(
"
Arg: %s
\n
",
$_
[
1
]);
if
(
$_
[
1
]
eq
"")
{
$sroot
=
get_var
("
Source root [%s]?
",
$sroot
);
}
else
{
$sroot
=
$_
[
1
];
}
if
(
$_
[
2
]
eq
"")
{
$vmsinc
=
get_var
("
Import root [%s]?
",
$vmsinc
);
}
else
{
$vmsinc
=
$_
[
2
];
}
if
(
$_
[
3
]
eq
"")
{
$broot
=
get_var
("
Build root [%s]?
",
$broot
);
}
else
{
$broot
=
$_
[
3
];
}
if
(
$_
[
4
]
eq
"")
{
$btype
=
get_var
("
Build type [%s]?
",
$btype
);
}
else
{
$btype
=
$_
[
4
];
}
if
(
$_
[
5
]
eq
"")
{
$os
=
get_var
("
OS [%s]?
",
$os
);
}
else
{
$os
=
$_
[
5
];
}
if
(
$_
[
6
]
eq
"")
{
$hw
=
get_var
("
Hardware [%s]?
",
$hw
);
}
else
{
$hw
=
$_
[
6
];
}
if
(
$_
[
7
]
eq
"")
{
$desc
=
get_var
("
Description [%s]?
",
$desc
);
}
else
{
$desc
=
$_
[
7
];
}
$varstr
=
join
("
;
",
(
$sroot
,
$vmsinc
,
$broot
,
$btype
,
$os
,
$hw
,
$desc
));
}
sub
get_var
()
{
my
(
$tmp
);
printf
(
$_
[
0
],
$_
[
1
]);
chomp
(
$tmp
=
<
STDIN
>
);
if
(
$tmp
eq
"")
{
$tmp
=
$_
[
1
];
}
return
$tmp
;
}
sub
read_vars
()
{
$varstr
=
$envdb
{
$label
};
(
$sroot
,
$vmsinc
,
$broot
,
$btype
,
$os
,
$hw
,
$desc
)
=
split
(
/;/
,
$varstr
);
@vars
=
(
$sroot
,
$vmsinc
,
$broot
,
$btype
,
$os
,
$hw
,
$desc
);
}
sub
show_vars
()
{
my
(
$module
)
=
$ENV
{"
pwre_module
"};
printf
("
-- Module.........: %s
\n
",
$module
);
printf
("
-- Source root....: %s
\n
",
$sroot
);
if
(
$vmsinc
ne
"")
{
printf
("
-- Import root....: %s
\n
",
$vmsinc
);
}
printf
("
-- Build root.....: %s
\n
",
$broot
);
printf
("
-- Build type.....: %s
\n
",
$btype
);
printf
("
-- OS.............: %s
\n
",
$os
);
printf
("
-- Hardware.......: %s
\n
",
$hw
);
printf
("
-- Description....: %s
\n
",
$desc
);
}
sub
update_db
()
{
$envdb
{
$label
}
=
$varstr
;
}
sub
usage_add
()
{
printf
("
++
\n
");
printf
("
++ add env : Adds an environment to the database
\n
");
}
sub
usage_configure
()
{
printf
("
++
\n
");
printf
("
++ configure : Configures an environment
\n
");
}
sub
usage_build
()
{
printf
("
++
\n
");
printf
("
++ build 'branch' 'subbranch' ['flavour']['phase']: Build, eg. pwre build exe rt* src all
\n
");
}
sub
usage_build_all
()
{
printf
("
++
\n
");
printf
("
++ build_all : Builds all in current module
\n
");
}
sub
usage_build_kernel
()
{
printf
("
++
\n
");
printf
("
++ build_kernel : Builds all in kernel modules (kernel, xtt, wb)
\n
");
}
sub
usage_build_all_modules
()
{
printf
("
++
\n
");
printf
("
++ build_all_modules : Builds all in all modules
\n
");
}
sub
usage_build_all_wbl
()
{
printf
("
++
\n
");
printf
("
++ build_all_wbl : Builds wbl in all modules
\n
");
}
sub
usage_ebuild
()
{
printf
("
++
\n
");
printf
("
++ ebuild 'block' 'flavour' : Builds rt or op block
\n
");
}
sub
usage_clean_exe_all
()
{
printf
("
++
\n
");
printf
("
++ clean_exe_all : Cleans all exe in all modules
\n
");
}
sub
usage_method_build
()
{
printf
("
++
\n
");
printf
("
++ method_build : Rebuild method dependent programs
\n
");
}
sub
usage_create_all_modules
()
{
printf
("
++
\n
");
printf
("
++ create_all_modules : Create build trees for all modules
\n
");
}
sub
usage_copy
()
{
printf
("
++
\n
");
printf
("
++ copy : Copy Proview include files from the VMS host
\n
");
}
sub
usage_create
()
{
printf
("
++
\n
");
printf
("
++ create : Creates the build directory tree
\n
");
}
sub
usage_dele
()
{
printf
("
++
\n
");
printf
("
++ delete 'env' : Deletes an environment from the database
\n
");
}
sub
usage_help
()
{
printf
("
++
\n
");
printf
("
++ help : Lists all command verbs
\n
");
}
sub
usage_list
()
{
printf
("
++
\n
");
printf
("
++ list : Lists all environments in the database
\n
");
}
sub
usage_init
()
{
printf
("
++
\n
");
printf
("
++ init 'env' : Inits an environment
\n
");
}
sub
usage_import
()
{
printf
("
++
\n
");
printf
("
++ import 'block' ['flavour'] : Import files from import root, block dbs, rt, op, java, doc
\n
");
}
sub
usage_module
()
{
printf
("
++
\n
");
printf
("
++ module 'module' : Set module
\n
");
}
sub
usage_merge
()
{
printf
("
++
\n
");
printf
("
++ merge : Merge module base to exp base
\n
");
}
sub
usage_modify
()
{
printf
("
++
\n
");
printf
("
++ modify 'env' : Modfies an existing environment
\n
");
}
sub
usage_show
()
{
printf
("
++
\n
");
printf
("
++ show [env] : Shows current or given environment
\n
");
}
sub
usage_tags
()
{
printf
("
++
\n
");
printf
("
++ tags : Creates a CRiSP tag-file named ~/pwre/tags
\n
");
}
src/tools/pwre/src/os_macos/pwre.source
0 → 100755
View file @
2b336f90
#!/bin/bash
#
# pwre.source
#
# This script must be sourced
#
# Only the init verb is handled by this script, all the others
# is handled by pwre.perl
#
#
# Don't call pwre.perl if it is the init verb
#
env
=
"
$2
"
local
cmd
cmd
=
"help"
if
[
-z
$1
]
||
[
$1
=
$cmd
]
||
[
${
cmd
#
$1
}
!=
$cmd
]
;
then
$pwre_bin
/pwre.pl
$@
return
fi
cmd
=
"init"
if
[
$1
=
$cmd
]
;
then
echo
"init..."
if
[
"
$env
"
=
""
]
;
then
echo
"++ init what?"
else
export
pwre_module
=
rt
export
pwre_bmodule
=
rt
if
$pwre_bin
/pwre.pl _exists
$2
;
then
set_env
`
$pwre_bin
/pwre.pl _print
$2
`
else
echo
"++ Environment
$2
doesn't exist"
fi
source
$pwre_bin
/pwre_function
fi
return
fi
cmd
=
"module"
if
[
$1
=
$cmd
]
;
then
echo
"module..."
if
[
-z
$2
]
;
then
export
pwre_module
=
"rt"
export
pwre_bmodule
=
"rt"
else
export
pwre_module
=
$2
export
pwre_bmodule
=
$2
fi
env
=
$pwre_env
set_env
`
$pwre_bin
/pwre.pl _print
$env
`
return
fi
$pwre_bin
/pwre.pl
$@
src/tools/pwre/src/os_macos/pwre_configure.sh
0 → 100755
View file @
2b336f90
#!/bin/bash
pwre_config_init
()
{
d
=
`
eval date
+
\"
%F %X
\"
`
cat
>
$cfile
<<
EOF
#!/bin/bash
#
# pwre configuration file
#
# Generated by pwre_configure
$d
# Do not edit this file
#
EOF
}
pwre_config_check_include
()
{
echo
-n
"...Checking inc
$1
: "
let
i
=
0
let
found
=
0
let
incfound
=
0
IFS
=
:
for
file
in
$4
do
if
test
-e
$file
;
then
echo
"found"
echo
"export PWRE_CONF_
$2
=1"
>>
$cfile
if
test
$3
==
"1"
;
then
conf_cc_define
=
$conf_cc_define
" -DPWRE_CONF_
$2
=1"
fi
incdir
=
${
file
%/*
}
if
test
$incdir
==
"/usr/include"
;
then
incfound
=
1
else
while
[
$i
-lt
$inc_cnt
]
;
do
if
test
${
inc_array
[
$i
]
}
==
$incdir
;
then
incfound
=
1
fi
i
=
$((
i+1
))
done
fi
if
test
$incfound
-eq
0
;
then
inc_array[
$inc_cnt
]=
$incdir
inc_cnt
=
$((
inc_cnt+1
))
fi
found
=
1
break
fi
done
if
test
$found
-eq
0
;
then
echo
"not found"
fi
}
pwre_config_check_lib
()
{
echo
-n
"...Checking
$1
: "
let
i
=
0
let
found
=
0
let
libfound
=
0
IFS
=
:
for
file
in
$6
do
if
test
-e
$file
;
then
echo
"found"
echo
"export PWRE_CONF_
$2
=1"
>>
$cfile
if
test
$5
==
"1"
;
then
conf_cc_define
=
$conf_cc_define
" -DPWRE_CONF_
$2
=1"
fi
if
test
$3
==
"lib"
;
then
libdir
=
${
file
%/*
}
if
test
$libdir
==
"/usr/lib"
;
then
libfound
=
1
else
while
[
$i
-lt
$lib_cnt
]
;
do
if
test
${
lib_array
[
$i
]
}
==
$libdir
;
then
libfound
=
1
fi
i
=
$((
i+1
))
done
fi
if
test
$libfound
-eq
0
;
then
lib_array[
$lib_cnt
]=
$libdir
lib_cnt
=
$((
lib_cnt+1
))
fi
lib
=
${
file
##/*/lib
}
if
test
$4
==
"gtk"
;
then
conf_libgtk
=
$conf_libgtk
" -l
${
lib
%.*
}
"
elif
test
$4
==
"motif"
;
then
conf_libmotif
=
$conf_libmotif
" -l
${
lib
%.*
}
"
else
conf_lib
=
$conf_lib
" -l
${
lib
%.*
}
"
fi
elif
test
$3
==
"gtk"
;
then
conf_libgtk
=
$conf_libgtk
"
\\\`
pkg-config --libs gtk+-2.0
\\\`
"
conf_incdirgtk
=
$conf_incdirgtk
"
\\\`
pkg-config --cflags gtk+-2.0
\\\`
"
else
echo
"Unknown type"
fi
found
=
1
break
fi
done
if
test
$found
-eq
0
;
then
echo
"not found"
echo
"export PWRE_CONF_
$2
=0"
>>
$cfile
fi
}
pwre_create_blddir
()
{
if
test
!
-e
$pwre_croot
/src/tools/bld/src/
$pwre_os
;
then
cp
-r
$pwre_croot
/src/tools/bld/src/os_templ
$pwre_croot
/src/tools/bld/src/
$pwre_os
mv
$pwre_croot
/src/tools/bld/src/
$pwre_os
/hw_templ
$pwre_croot
/src/tools/bld/src/
$pwre_os
/
$pwre_hw
elif
test
!
-e
$pwre_croot
/src/tools/bld/src/
$pwre_os
/
$pwre_hw
;
then
cp
-r
$pwre_croot
/src/tools/bld/src/os_templ/hw_templ
$pwre_croot
/src/tools/bld/src/
$pwre_os
/
$pwre_hw
fi
}
pwre_create_makedir
()
{
dirlist
=
`
eval
find
$pwre_croot
-name
"os_templ"
`
for
dir
in
$dirlist
;
do
newdir
=
${
dir
%/*
}
/
$pwre_os
if
test
!
-e
$newdir
;
then
newdir
=
${
dir
%/*
}
/.
$pwre_os
if
test
!
-e
$newdir
;
then
echo
"Creating
$newdir
"
cp
-pr
$dir
$newdir
if
test
-e
$newdir
/hw_templ
;
then
mv
$newdir
/hw_templ
$newdir
/.
$pwre_hw
fi
else
# os directory .os_ already exist
# Copy new and modified files
filelist
=
`
eval ls
$dir
/
`
for
file
in
$filelist
;
do
if
test
!
-d
$dir
/
$file
;
then
cp
-p
$dir
/
$file
$newdir
/
fi
done
if
test
-e
$newdir
/.
$pwre_hw
;
then
cp
-p
$dir
/hw_templ/
*
$newdir
/.
$pwre_hw
/
elif
test
-e
$dir
/hw_templ
;
then
# Create hw dir
echo
"Creating
$newdir
/
$pwre_hw
"
cp
-pr
$dir
/hw_templ
$newdir
/.
$pwre_hw
fi
fi
else
## os director os_ exist
if
test
!
-e
$newdir
/
$pwre_hw
;
then
if
test
-e
$newdir
/.
$pwre_hw
;
then
cp
-p
$dir
/hw_templ/
*
$newdir
/.
$pwre_hw
/
elif
test
-e
$dir
/hw_templ
;
then
# Create hw dir
echo
"Creating
$newdir
/.
$pwre_hw
"
cp
-pr
$dir
/hw_templ
$newdir
/.
$pwre_hw
fi
fi
fi
done
}
#pwre_os="os_linux"
#pwre_hw="hw_x86"
cfile
=
"
$pwre_broot
/pwre_
${
pwre_hw
:3
}
_
${
pwre_os
:3
}
.cnf"
dos
=
`
eval echo
${
pwre_os
}
|
tr
[
:lower:]
[
:upper:]
`
dhw
=
`
eval echo
${
pwre_hw
}
|
tr
[
:lower:]
[
:upper:]
`
conf_cc_define
=
"-D
$dos
=1 -D
$dhw
=1 -DOS=
${
pwre_os
:3
}
-DHW=
${
pwre_hw
:3
}
-D_
${
dos
:3
}
"
conf_lib
=
""
conf_libgtk
=
""
conf_libmotif
=
""
conf_libdir
=
""
conf_incdirgtk
=
""
let
inc_cnt
=
0
let
lib_cnt
=
0
let
i
=
0
# Bash
if
[
"
$SHELL
"
!=
"/bin/bash"
]
&&
[
"
$SHELL
"
!=
"/usr/local/bin/bash"
]
;
then
echo
"Config error: Default shell has to be bash"
exit
fi
echo
"...Checking /bin/bash"
if
test
!
-e
/bin/bash
;
then
if
test
-e
/usr/local/bin/bash
;
then
echo
"Config error: /bin/bash not found"
echo
" Create link /bin/bash to /usr/local/bin/bash (ln -s /usr/local/bin/bash /bin/bash)"
else
echo
"Config error: /bin/bash not found"
fi
exit
fi
if
test
"
$pwre_broot
"
==
""
;
then
echo
"Config error: pwre not initialized"
exit
fi
if
test
!
-w
$pwre_broot
;
then
echo
"Config error: pwre build root doesn't exist or is not writable"
exit
fi
if
test
!
-e
$pwre_croot
;
then
echo
"Config error: pwre source root doesn't exist"
exit
fi
pwre_create_blddir
pwre_create_makedir
pwre_config_init
#Gtk
pwre_config_check_lib gtk GTK gtk gtk 0 /sw/lib/libgtk-x11-2.0.dylib
pwre_config_check_lib libantlr LIBANTLR lib lib 0 /usr/local/lib/libantlr.a
pwre_config_check_lib librpcsvc LIBRPCSVC lib lib 0 /usr/lib/librpcsvc.dylib:/usr/lib/librpcsvc.a
pwre_config_check_lib libasound LIBASOUND lib lib 0 /usr/lib/libasound.dylib:/usr/lib/libasound.a
pwre_config_check_lib libpthread LIBPTHREAD lib lib 0 /usr/lib/libpthread.dylib:/usr/lib/libpthread.a
pwre_config_check_lib libm LIBM lib lib 0 /usr/lib/libm.dylib:/usr/lib/libm.a
pwre_config_check_lib libdb_cxx LIBDB_CXX lib lib 0 /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.dylib:/usr/lib/libdb_cxx.so
pwre_config_check_lib libz LIBZ lib lib 0 /usr/lib/libz.dylib:/usr/lib/libz.a
pwre_config_check_lib libcrypt LIBCRYPT lib lib 0 /usr/lib/libcrypt.dylib:/usr/lib/libcrypt.a
pwre_config_check_lib mysql MYSQL lib lib 1 /usr/lib/libmysqlclient.dylib
pwre_config_check_lib mq MQ lib lib 1 /usr/lib/libdmq.dylib
pwre_config_check_lib libpnioif PNAK lib lib 1 /usr/lib/libpnioif.so:/usr/local/lib/libpnioif.a
pwre_config_check_lib libusb LIBUSB lib lib 1 /usr/lib/libusb-1.0.so
pwre_config_check_lib librt LIBRT lib lib 0 /usr/lib/librt.dylib:/usr/lib/librt.a
pwre_config_check_lib libiconv LIBICONV lib lib 0 /usr/lib/libiconv.dylib
pwre_config_check_lib libfl LIBFL lib lib 0 /usr/lib/libfl.dylib:/usr/lib/libfl.a
#set -o xtrace
pwre_config_check_include antlr ANTLR 1 /usr/local/include/antlr/CommonAST.hpp
pwre_config_check_include gtk GTK 1 /sw/include/gtk-2.0/gtk/gtk.h
pwre_config_check_include jni JNI 1 /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/jni.h:
$jdk
/include/jni.h
pwre_config_check_include jni JNI 0
$jdk
/include/linux/jni_md.h
pwre_config_check_include libdb_cxx LIBDB_CXX 0 /usr/local/BerkeleyDB.4.8/include/db_cxx.h:/usr/lib/db_cxx.h
export
pwre_conf_alsa
=
1
let
i
=
0
while
[
$i
-lt
$inc_cnt
]
;
do
conf_incdir
=
$conf_incdir
" -I
${
inc_array
[
$i
]
}
"
i
=
$((
i+1
))
done
let
i
=
0
while
[
$i
-lt
$lib_cnt
]
;
do
conf_libdir
=
$conf_libdir
" -L
${
lib_array
[
$i
]
}
"
i
=
$((
i+1
))
done
rm
$pwre_croot
/src/exe/rt_prio/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm $pwre_croot/otherio/exp/rt/src/.${pwre_os}/.${pwre_hw}/makefile
rm
$pwre_croot
/remote/exe/rs_remote_alcm/src/.
${
pwre_os
}
/.
${
pwre_hw
}
/makefile
#rm $pwre_croot/profibus/lib/rt/src/.${pwre_os}/.${pwre_hw}/makefile
echo
"export pwre_conf_cc_define=
\"
$conf_cc_define
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrco=
\"
-lpwr_co
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrrt=
\"
-lpwr_rt -lpwr_co -lpwr_statussrv -lpwr_msg_dummy
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrotherio=
\"
-lpwr_usbio_dummy -lpwr_usb_dummy
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxtt=
\"
-lpwr_xtt -lpwr_ge -lpwr_cow -lpwr_flow -lpwr_glow
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxttgtk=
\"
-lpwr_xtt_gtk -lpwr_ge_gtk -lpwr_cow_gtk -lpwr_flow_gtk -lpwr_glow_gtk
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrxttmotif=
\"
-lpwr_ge_motif -lpwr_cow_motif -lpwr_flow_motif -lpwr_glow_motif
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrwb=
\"
-lpwr_wb
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrwbgtk=
\"
-lpwr_wb_gtk
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrwbmotif=
\"
-lpwr_wb_motif
\"
"
>>
$cfile
echo
"export pwre_conf_libpwropc=
\"
-lpwr_opc
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrremote=
\"
-lpwr_remote
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrnmps=
\"
-lpwr_nmps
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrtlog=
\"
-lpwr_tlog
\"
"
>>
$cfile
echo
"export pwre_conf_libpwrsev=
\"
-lpwr_sev
\"
"
>>
$cfile
echo
"export pwre_conf_lib=
\"
$conf_lib
\"
"
>>
$cfile
echo
"export pwre_conf_libgtk=
\"
$conf_libgtk
\"
"
>>
$cfile
echo
"export pwre_conf_libmotif=
\"
$conf_libmotif
\"
"
>>
$cfile
echo
"export pwre_conf_libdir=
\"
$conf_libdir
\"
"
>>
$cfile
echo
"export pwre_conf_incdir=
\"
$conf_incdir
\"
"
>>
$cfile
echo
"export pwre_conf_incdirgtk=
\"
$conf_incdirgtk
\"
"
>>
$cfile
src/tools/pwre/src/os_macos/pwre_function
0 → 100755
View file @
2b336f90
#
# Proview build environment setup
#
# Environment variables
#
# $pwre_croot Common source root, pwr
# $pwre_kroot Rt source root, pwr/src
# $pwre_sroot Module source root, eg. pwr/ssabox
# $pwre_broot Common build root
# $pwre_module Module name in source tree, eg. 'ssabox'
# $pwre_bmodule Module name in build tree, eg. 'ssabox'
# $pwre_os Operating system, eg. 'os_linux'
# $pwre_hw Hardware, eg. 'hw_x86'
# $pwr_exe Exe directory for module build root, eg. ssabox/exe
# $pwr_load Load directory for module build root
# $pwr_inc Inc directory for module build root
# $pwr_obj Obj directory for module build root
# $pwr_lib Lib directory for module build root
# $pwr_eexe Exe directory for common build root, ex. exp/exe
# $pwr_eload Load directory for common build root
# $pwr_einc Inc directory for common build root
# $pwr_eobj Obj directory for common build root
# $pwr_elib Lib directory for common build root
pwre()
{
if [ "$HOSTTYPE" = "alpha" ]; then
pwre_silent="-q"
else
pwre_silent="-s"
fi
export pwre_hosttype=$HOSTTYPE
local flags="$-"
if [ -e $pwre_broot/pwre_${pwre_hw:3}_${pwre_os:3}.cnf ]; then
source $pwre_broot/pwre_${pwre_hw:3}_${pwre_os:3}.cnf
fi
# Turn off filename globber
set -f
source $pwre_bin/pwre.source $@
if echo "$flags" | grep $pwre_silent -v f; then
set +f
fi
}
set_env()
{
if [ "$pwr_eexe" != "" ]; then
export PATH=${PATH%:$pwr_eexe}
export PATH=${PATH%:$pwr_exe}
fi
module=$pwre_module
if [ $module = "rt" ]; then
module=src
fi
sroot=${1%/*}
export pwre_croot=$sroot
export pwre_sroot=$sroot/$module
export pwre_kroot=$sroot/src
export pwre_env="$env"
export pwre_vmsinc="$2"
export pwre_broot="$3"
export pwre_btype="$4"
export pwre_os="os_$5"
export pwre_hw="hw_$6"
export pwre_target="$pwre_os/$pwre_hw"
export pwre_bin="$pwre_kroot/tools/pwre/src/$pwre_os"
export pwre_dir_symbols="$pwre_bin/dir_symbols.mk"
export pwr_exe="$pwre_broot/$pwre_os/$pwre_hw/$pwre_bmodule/exe"
export pwr_inc="$pwre_broot/$pwre_os/$pwre_hw/$pwre_bmodule/inc"
export pwr_load="$pwre_broot/$pwre_os/$pwre_hw/$pwre_bmodule/load"
export pwr_lib="$pwre_broot/$pwre_os/$pwre_hw/$pwre_bmodule/lib"
export pwr_lis="$pwre_broot/$pwre_os/$pwre_hw/$pwre_bmodule/lis"
export pwr_obj="$pwre_broot/$pwre_os/$pwre_hw/$pwre_bmodule/obj"
# Common doc
export pwr_doc="$pwre_broot/$pwre_os/$pwre_hw/exp/doc"
export pwr_eexe="$pwre_broot/$pwre_os/$pwre_hw/exp/exe"
export pwr_einc="$pwre_broot/$pwre_os/$pwre_hw/exp/inc"
export pwr_eload="$pwre_broot/$pwre_os/$pwre_hw/exp/load"
export pwr_elib="$pwre_broot/$pwre_os/$pwre_hw/exp/lib"
export pwr_elis="$pwre_broot/$pwre_os/$pwre_hw/exp/lis"
export pwr_eobj="$pwre_broot/$pwre_os/$pwre_hw/exp/obj"
export pwr_edoc="$pwre_broot/$pwre_os/$pwre_hw/exp/doc"
export pwrp_load="./"
export pwrp_pop="./"
export co_lib="$pwre_kroot/lib/co/src"
export op_lib="$pwre_kroot/lib/op/src"
export rt_lib="$pwre_kroot/lib/rt/src"
export wb_lib="$pwre_kroot/lib/wb/src"
export exe="$pwre_kroot/exe"
# PWR alias
alias pwr_root="cd $pwre_kroot"
alias pwr_exe="cd $pwr_exe"
alias pwr_inc="cd $pwr_inc"
alias pwr_load="cd $pwr_load"
alias pwr_lib="cd $pwr_lib"
alias pwr_lis="cd $pwr_lis"
alias pwr_obj="cd $pwr_obj"
alias co_lib="cd $pwre_kroot/lib/co/src"
alias op_lib="cd $pwre_kroot/lib/op/src"
alias rt_lib="cd $pwre_kroot/lib/rt/src"
alias wb_lib="cd $pwre_kroot/lib/wb/src"
alias db="cd $pwre_kroot/db"
alias exe="cd $pwre_kroot/exe"
alias exp="cd $pwre_kroot/exp"
alias inc="cd $pwre_kroot/exp/inc/src"
alias lib="cd $pwre_kroot/lib"
alias hlp="cd $pwre_kroot/hlp"
alias mmi="cd $pwre_kroot/mmi"
alias msg="cd $pwre_kroot/msg"
alias tools="cd $pwre_kroot/tools"
alias wbl="cd $pwre_kroot/wbl"
alias hw="cd $pwre_target"
alias bld="cd $pwre_broot/$pwre_target/bld"
alias co_bld="cd $pwre_broot/$pwre_target/bld/lib/co"
alias rt_bld="cd $pwre_broot/$pwre_target/bld/lib/rt"
alias exe_bld="cd $pwre_broot/$pwre_target/bld/exe"
alias tmp="cd $pwre_broot/$pwre_target/tmp"
pwre_get_variables
export PWRP_DB=$pwr_my_sqlserver":wb_template_"$pwr_dbversion
# export CLASSPATH=$pwre_broot/$pwre_os/$pwre_hw/bld/jpwr/rt:$pwre_broot/$pwre_os/$pwre_hw/bld/jpwr/jop:$pwre_broot/$pwre_os/$pwre_hw/bld/jpwr/beans
export CLASSPATH=$pwre_broot/$pwre_target/bld
export PATH=$PATH:$pwr_exe:$pwr_eexe
# Configure
# Dmq
if [ -e /usr/lib/libdmq.so ]; then
export pwre_conf_mq=1
else
export pwre_conf_mq=0
fi
# Mysql
if [ -e /usr/lib/libmysqlclient.so ] || [ -e /usr/lib/mysql/libmysqlclient.so ]; then
export pwre_conf_mysql=1
else
export pwre_conf_mysql=0
fi
# Gtk
if [ -e /usr/lib/libgtk-x11-2.0.so ]; then
export pwre_conf_gtk=1
else
export pwre_conf_gtk=0
fi
# libusb
if [ -e /usr/lib/libusb-1.0.so ]; then
export pwre_conf_libusb=1
else
export pwre_conf_libusb=0
fi
export pwre_conf_alsa=1
}
pwre_get_variables()
{
local socket
socket=`eval cat /etc/proview.cnf | grep "\bmysql_socket\b" | awk '{print $2}'`
if [ ! -z $socket ]; then
mysql_socket="--socket $socket"
fi
if [ -n $pwre_kroot ]; then
pwr_dbversion=`eval cat $pwre_kroot/exp/inc/src/pwr_version.h | grep "\bpwrv_cWbdbVersionShortStr\b" | awk '{print $3}'`
if [ -z $pwr_dbversion ]; then
echo "Unable to get pwr db version"
fi
export pwr_dbversion=${pwr_dbversion:1:3}
export pwre_dbversion=$pwr_dbversion
fi
}
src/tools/pwre/src/os_macos/pwre_merge.sh
0 → 100755
View file @
2b336f90
#!/bin/bash
#
# Merge build tree for a module to common build tree
#
merge_dir_func
()
{
local
todir
=
$1
local
fromdir
=
$2
local
singlefile
=
$3
if
[
"
$singlefile
"
!=
""
]
;
then
files
=
$singlefile
todir
=
$todir
/
${
singlefile
%/*
}
else
files
=
`
eval ls
$fromdir
2>/dev/null
`
fi
if
[
!
-z
"
$files
"
]
;
then
for
file
in
$files
;
do
if
[
!
-d
$fromdir
/
$file
]
;
then
if
[
-e
$todir
/
$file
]
;
then
if
[
$todir
/
$file
-ot
$fromdir
/
$file
]
;
then
echo
"Copy
$fromdir
/
$file
"
cp
$fromdir
/
$file
$todir
fi
else
echo
"Copy
$fromdir
/
$file
"
cp
$fromdir
/
$file
$todir
if
[
${
file
##*.
}
=
"dbs"
]
;
then
# Change access on dbsfiles
chmod
a+w
$todir
/
$file
fi
fi
fi
done
fi
}
fromroot
=
$1
toroot
=
$2
file
=
$3
if
[
"
$file
"
!=
""
]
;
then
# Merge only this file
merge_dir_func
$toroot
$fromroot
$file
else
# Copy exe, load, obj and inc
merge_dir_func
$toroot
/exe
$fromroot
/exe
merge_dir_func
$toroot
/exe/sv_se
$fromroot
/exe/sv_se
merge_dir_func
$toroot
/exe/en_us
$fromroot
/exe/en_us
merge_dir_func
$toroot
/exe/de_de
$fromroot
/exe/de_de
merge_dir_func
$toroot
/inc
$fromroot
/inc
merge_dir_func
$toroot
/load
$fromroot
/load
merge_dir_func
$toroot
/obj
$fromroot
/obj
# Merge archives
cd
${
toroot
%/*
}
/tmp
libraries
=
`
eval ls
$fromroot
/lib/
*
2>/dev/null
`
for
lib
in
$libraries
;
do
arname
=
${
lib
##/*/
}
if
[
$arname
=
"libpwr_rt.a"
]
||
[
$arname
=
"libpwr_cow.a"
]
||
[
$arname
=
"libpwr_cow_motif.a"
]
||
[
$arname
=
"libpwr_cow_gtk.a"
]
||
[
$arname
=
"libpwr_wb.a"
]
||
[
$arname
=
"libpwr_wb_motif.a"
]
||
[
$arname
=
"libpwr_wb_gtk.a"
]
||
[
$arname
=
"libpwr_xtt.a"
]
||
[
$arname
=
"libpwr_xtt_motif.a"
]
||
[
$arname
=
"libpwr_xtt_gtk.a"
]
;
then
echo
"Merge
$lib
"
modules
=
`
eval
ar
-t
$lib
`
ar
-x
$lib
ar
-rc
$toroot
/lib/
$arname
$modules
rm
$modules
else
echo
"Copy
$lib
"
cp
$lib
$toroot
/lib/
fi
done
# Merge io methods
methodfile
=
$pwr_inc
/rt_io_
$pwre_module
.meth
if
[
-e
$methodfile
]
;
then
echo
"-- Merge io methods"
co_merge io_base
$pwr_einc
/rt_io_
\*
.meth
$pwr_elib
/libpwr_rt.a
fi
# Merge wb methods
methodfile
=
$pwr_inc
/wb_
$pwre_module
.meth
if
[
-e
$methodfile
]
;
then
echo
"-- Merge wb methods"
co_merge wb_base
$pwr_einc
/wb_
\*
.meth
$pwr_elib
/libpwr_wb.a
fi
# Merge xtt methods
methodfile
=
$pwr_inc
/xtt_
$pwre_module
.meth
if
[
-e
$methodfile
]
;
then
echo
"-- Merge xtt methods"
co_merge xtt_base
$pwr_einc
/xtt_
\*
.meth
$pwr_elib
/libpwr_xtt.a
fi
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment