# +----------------------------------------------------------------------+ # | Aubit 4gl Language Compiler Version $.0 root makefile | # +----------------------------------------------------------------------+ # | Copyright (c) 2000-1 Aubit Development Team (See Credits file) | # +----------------------------------------------------------------------+ # | This program is free software; you can redistribute it and/or modify | # | it under the terms of one of the following licenses: | # | | # | A) the GNU General Public License as published by the Free Software | # | Foundation; either version 2 of the License, or (at your option) | # | any later version. | # | | # | B) the Aubit License as published by the Aubit Development Team and | # | included in the distribution in the file: LICENSE | # | | # | This program is distuributed in the hope that it will be useful, | # | but WITHOUT ANY WARRANTY; without even the implied warranty of | # | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # | GNU General Public License for more details. | # | | # | You should have received a copy of both licenses referred to here. | # | If you did not, or have any questions about Aubit licensing, please | # | contact afalout@ihug.co.nz | # +----------------------------------------------------------------------+ # # $Id: Makefile,v 1.86 2011/08/30 16:52:47 mikeaubury Exp $ # #Save initial state of system varables, so we can undo changes #made by makefiles when we have to INIT_PATH :=${PATH} INIT_LD_LIBRARY_PATH :=${LD_LIBRARY_PATH} ## ================================================================== ## Includes ## ================================================================== #All stuff common to more then one Aubit compiler make file is there: include incl/Makefile-common ## ================================================================== ## Define default target ## ================================================================== ############################### #All targets in this make file are "phony" targets - they do not create #anything, they just invoke other make files: .PHONY: all clean default log corecompile extra ide api.headers glade help deinstall config ############################### #Things we compile by default ALL =settings api.headers corecompile libfile libhtml libstring picklib ifneq "${enable_minimal}" "yes" ALL += liblogical glade aace endif ############################### #Things we compile with 'extra' target ALL_EXTRA =ide odbctest libhtml misql adbload #FIXME: All stuff that should be in ALL_EXTRA, but does not compile: ALL_EXTRA_BROKEN= ALL_EXTRA_BROKEN = ifneq "${PERLBUILD}" "no" ALL_EXTRA_BROKEN+=perl endif ifneq "${JABBERBUILD}" "no" ALL_EXTRA +=jabber endif #ifneq "${DOXYGEN}" "no" #Dont put DoxyGen in extra target - it takes a long time, and aubitbuild #calls 'make extra' and so it would tun it twice - as part of 'make extra' #ALL_EXTRA +=doxy #endif ################################ #Define targets for liblogical #Libraries are made with lib makefile LIBLOGICAL_BUILD=bin/process_report ${PLUGINDIR}/libLOGREPPROC_TXT${SO_EXT} bin/quick_check_logrep \ ${PLUGINDIR}/libLOGREPPROC_CSV${SO_EXT} LIBLOGICAL_GTK2_DEPEND=${PLUGINDIR}/libLOGREP_CSV${SO_EXT} bin/layout_engine bin/report_viewer \ ${PLUGINDIR}/libLOGREP_TXT${SO_EXT} LIBLOGICAL_PDF_DEPEND=${PLUGINDIR}/libLOGREPPROC_PDF${SO_EXT} ${PLUGINDIR}/libLOGREP_PDF${SO_EXT} ifeq "${GTK_VERSION}" "2.0" LIBLOGICAL_BUILD+=${LIBLOGICAL_GTK2_DEPEND} endif ifneq "${PDFBUILD}" "no" LIBLOGICAL_BUILD+=${LIBLOGICAL_PDF_DEPEND} endif ifeq "$(HAVE_CURSES)" "1" ifeq "$(A4GL_UI)" "CONSOLE" CORE_ALL=core.ui.console core.ui.xml REST_ALL=compile_rest_console else CORE_ALL=core.ui.console.and.curses core.ui.xml REST_ALL=compile_rest_tui endif else CORE_ALL= core.ui.console core.ui.xml REST_ALL=compile_rest_console endif ## ================================================================== ## Targets ## ================================================================== #default: ${ALL} default.msg default: ${ALL} test default.msg.tmp @echo " " default.msg.tmp: @echo " " @echo "+----------------------------------------------------------------------+" @echo "| Successfully compiled Aubit compiler default targets |" @echo "| You should install it before you can use it - execute 'make install' |" @echo "| |" @echo "| Current default install settings : |" @echo "| PREFIX =${PREFIX} " @echo "| LIB_INSTALL_LINK =${LIB_INSTALL_LINK}" @echo "| BIN_INSTALL_LINK =${BIN_INSTALL_LINK}" @echo "| Override any variable above using 'make install =' |" @echo "| Execute 'make extra' to compile additional components: |" @echo "| ${ALL_EXTRA} " @echo "| Use Aubit regression tests available from CVS to test the build. |" @echo "| Use 'make doxy' to create API documentation. |" @echo "| |" @echo "| If you prefer to run Aubit4GL 'inplace' - then please set the |" @echo "| environment as required. Eg. |" @echo "| |" @echo "| For Linux & most Unix : |" @echo "| export AUBITDIR=${AUBIT_SRC_ROOT} " @echo '| export PATH=$$PATH:$$AUBITDIR/bin ' @echo '| export LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$$AUBITDIR/lib ' @echo "| |" @echo "| For Windows : |" @echo "| export AUBITDIR=${AUBIT_SRC_ROOT} " @echo '| export PATH=$$PATH:$$AUBITDIR/bin:$$AUBITDIR/lib ' @echo "| |" @echo "| For MacOSX : |" @echo "| export AUBITDIR=${AUBIT_SRC_ROOT} " @echo '| export PATH=$$PATH:$$AUBITDIR/bin ' @echo '| export DYLD_LIBRARY_PATH=$$DYLD_LIBRARY_PATH:$$AUBITDIR/lib ' @echo "| |" @echo "| For HPUX : |" @echo "| export AUBITDIR=${AUBIT_SRC_ROOT} " @echo '| export PATH=$$PATH:$$AUBITDIR/bin ' @echo '| export SHLIB_PATH=$$SHLIB_PATH:$$AUBITDIR/lib ' @echo "| |" @echo "| |" @echo "| You may need to add any directories for any used libraries to the |" @echo "| DYLD_LIBRARY_PATH or LD_LIBRARY_PATH etc (eg. for Informix, MYSQL, |" @echo "| postgresql etc) |" @echo "+----------------------------------------------------------------------+" @echo " " @echo "Thank you for using Aubit 4gl compiler" default.msg: TITLE="Default Aubit targets compiled successfuly" default.msg: MSG=\ "Successfully compiled Aubit compiler default targets \n\ You MUST install it before you can use it - execute 'make install' \n\ Current default install settings : \n\ PREFIX=${PREFIX} (under ${AUBITNAME}) \n\ LIB_INSTALL_LINK=${LIB_INSTALL_LINK} \n\ BIN_INSTALL_LINK=${BIN_INSTALL_LINK} \n\ Execute 'make extra' to compile additional components: \n\ ${ALL_EXTRA} \n\ Use Aubit regression tests available from CVS to test the build. \n\ Use 'make doxy' to create API documentation. \n\ \n\ Thank you for using Aubit 4gl compiler \n" default.msg: ifeq "${DIALOG_TYPE}" "no" @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Successfully compiled Aubit compiler default targets |" @echo "| You MUST install it before you can use it - execute 'make install' |" @echo "| Current default install settings : |" @echo "| PREFIX =${PREFIX} (under ${AUBITNAME}) " @echo "| LIB_INSTALL_LINK =${LIB_INSTALL_LINK}" @echo "| BIN_INSTALL_LINK =${BIN_INSTALL_LINK}" @echo "| You can override PREFIX with 'make install PREFIX=/some/path' |" @echo "| Execute 'make extra' to compile additional components: |" @echo "| ${ALL_EXTRA}" @echo "| Use Aubit regression tests available from CVS to test the build. |" @echo "| Use 'make doxy' to create API documentation. |" @echo "+--------------------------------------------------------------------+" @echo " " @echo "Thank you for using Aubit 4gl compiler" else #--msgbox ifeq "${DIALOG_TYPE}" "TUI" #--backtitle #--beep #--stdout @${TUI_DIALOG} --stdout --cr-wrap --sleep 10 --title ${TITLE} --infobox ${MSG} 0 0 else @${XDIALOG} --title ${TITLE} --infobox ${MSG} 0 0 10000 endif # case $? in # 0) # echo "OK";; # 255) # echo "Box closed.";; # esac endif #Target do make default and extra targets, and install everything all: default extra install #Target to perform default compile, logging the output to file log: @echo "Logging make process to make.log, please wait..." @time ${MAKE} > make.log 2>&1 @echo "make finished successfuly, see make.log for details." @echo "Total compiler warnings: `grep -c 'warning:' make.log`" rest: bootstrap $(REST_ALL) bootstrap: bootstrap.core.progs bootstrap.core.ui compile_rest_tui: $(MAKE) -C tools/extras_compile A4GL_UI=TUI tools/extras_compile/extras_compile compile_rest_console: $(MAKE) -C tools/extras_compile A4GL_UI=CONSOLE tools/extras_compile/extras_compile bootstrap.core.progs: $(MAKE) -C lib/libaubit4gl api.headers $(MAKE) -C compilers/xgen $(MAKE) -C common/dataio $(MAKE) -C lib/libaubit4gl $(MAKE) -C compilers/4glc $(MAKE) -C lib/liblex/lex_esqlc $(MAKE) -C tools/4glpc bootstrap.core.ui: $(CORE_ALL) core.test: echo $(CORE_ALL) echo "$(HAVE_CURSES)" echo "$(A4GL_UI)" core.ui.console.and.curses: core.ui.console core.ui.curses core.ui.console: $(MAKE) -C lib/libui/ui_console core.ui.curses: $(MAKE) -C lib/libui/ui_curses core.ui.xml: $(MAKE) -C lib/libui/ui_xml #main target of default build corecompile: api.headers @echo "Making XGEN" $(MAKE) -C compilers/xgen @echo "Making Dataio" $(MAKE) -C common/dataio @echo "Making lib" $(MAKE) -C lib @echo "Making compilers/4glc" $(MAKE) -C compilers/4glc @echo "Making compilers/sql" $(MAKE) -C compilers/sql @echo "Making compilers/helpcompile" $(MAKE) -C compilers/helpcompile $(MAKE) -C tools/4glpc $(MAKE) -C compilers/fcompile $(MAKE) -C compilers/menus $(MAKE) -C lib loadmap $(MAKE) -C tools/convertsql $(MAKE) -C tools/afinderr $(MAKE) -C tools/configuration $(MAKE) -C tools/quickguide $(MAKE) -C tools/asql $(MAKE) -C tools/a4gl $(MAKE) -C tools/adbschema $(MAKE) -C compilers/4glc fglproto ifneq "${IFMX_ESQLC}" "no" #curently compiles only with ESQL/C $(MAKE) -C tools/aupscol $(MAKE) -C tools/adbload2 endif $(MAKE) -C help @echo Aubit 4gl compiler core is now compiled aace: $(MAKE) -C compilers/ace pcode: ifeq "${PCODE_ENABLED}" "yes" ifneq "${BISON}" "no" $(MAKE) -C compilers/pcode else @echo "PCODE compilation skipped (no bison)" endif else @echo "PCODE compilation disabled (PCODE_ENABLED='${PCODE_ENABLED}')" endif #Stuff form Mike's 'remake.mja' #TODO - shoud be part of this makefile #cd lib/libui/ui_curses; sh make_static #cd lib/libsql/esqlc; sh make_static; sh make_simple #cd lib/libesql; sh make_static; sh make_simple #Target to create API headers from .spec files api.headers: $(MAKE) -C lib/libaubit4gl api.headers ## ================================================================== ## LibLogical targets ## ================================================================== liblogical: ${LIBLOGICAL_BUILD} ifneq "${GTK_VERSION}" "2.0" @echo " " @echo " ** WARNING:" @echo " ** GTK+ version 2 not detected (have ${GTK_VERSION}) skipped targets:" @echo "${LIBLOGICAL_GTK2_DEPEND}" @echo " " endif ifneq "${PDFBUILD}" "yes" @echo " " @echo " ** WARNING:" @echo " ** PDF library not detected, skipped targets:" @echo "${LIBLOGICAL_PDF_DEPEND}" @echo " " endif @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Successfuly built liblogical targets: |" @echo "| ${LIBLOGICAL_BUILD}" @echo "+--------------------------------------------------------------------+" @echo " " bin/process_report: $(MAKE) -C lib/liblogical/processor bin/quick_check_logrep: $(MAKE) -C lib/liblogical/processor qc bin/layout_engine: $(MAKE) -C lib/liblogical/layout_engine bin/report_viewer: $(MAKE) -C lib/liblogical/report_viewer #Now in lib makefile: ${PLUGINDIR}/libLOGREPPROC_TXT${SO_EXT}: $(MAKE) -C lib/liblogical/txt/process ${PLUGINDIR}/libLOGREPPROC_CSV${SO_EXT}: $(MAKE) -C lib/liblogical/csv/process ${PLUGINDIR}/libLOGREPPROC_PDF${SO_EXT}: $(MAKE) -C lib/liblogical/pdf/process ${PLUGINDIR}/libLOGREP_TXT${SO_EXT}: $(MAKE) -C lib/liblogical/txt/layout ${PLUGINDIR}/libLOGREP_CSV${SO_EXT}: $(MAKE) -C lib/liblogical/csv/layout ${PLUGINDIR}/libLOGREP_PDF${SO_EXT}: $(MAKE) -C lib/liblogical/pdf/layout clean.liblogical: $(MAKE) -C lib/liblogical/processor clean $(MAKE) -C lib/liblogical/layout_engine clean $(MAKE) -C lib/liblogical/report_viewer clean $(MAKE) -C lib/liblogical/txt/layout clean $(MAKE) -C lib/liblogical/txt/process clean $(MAKE) -C lib/liblogical/csv/layout clean $(MAKE) -C lib/liblogical/csv/process clean $(MAKE) -C lib/liblogical/pdf/layout clean $(MAKE) -C lib/liblogical/pdf/process clean ## ================================================================== ## Extra ## ================================================================== extra: extra_msg ${ALL_EXTRA} @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Successfully compiled aditional Aubit components : |" @echo "| ${ALL_EXTRA}." @echo "| FIXME: still broken targets: |" @echo "| ${ALL_EXTRA_BROKEN}." @echo "+--------------------------------------------------------------------+" @echo " " extra_msg: @echo "Will make: ${ALL_EXTRA}" ide: $(MAKE) -C tools/ide # $(MAKE) -C tools/ide install.aubit libfile: $(MAKE) -C lib/extra_libs/file picklib: $(MAKE) -C lib/extra_libs/pick libstring: $(MAKE) -C lib/extra_libs/string libhtml: $(MAKE) -C tools/html libA4GL_HTML${SO_EXT} #This is now more or less obsolete - use asql instead misql: # $(MAKE) -C tools/misql use.amake #We have a problem with getopt_long() on CygWin, so use 4glpc for now: $(MAKE) -C tools/misql misql.4ae odbctest: $(MAKE) -C tools/odbctest jabber: # $(MAKE) -C tools/jabber libIM_JABBER${SO_EXT} $(MAKE) -C lib ${PLUGINDIR}/libIM_JABBER${SO_EXT_LINKABLE} adbload: $(MAKE) -C tools/adbload #Glade IDE has no dependencies to compile, SQL Editor needs IFX ESQL #(check is in it's makefile). Both need libglade to run. #TODO: include in install/deinstall, RPM and Windows installer glade: $(MAKE) -C glade/ide ifneq "${IFMX_ESQLC}" "no" $(MAKE) -C glade/ide/sqleditor endif @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Successfuly built Glade support |" @echo "+--------------------------------------------------------------------+" @echo " " ## ================================================================== ## Perl output mode ## ================================================================== perl: api perl.compiler perl.lib test.perl @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Perl - done. " @echo "+--------------------------------------------------------------------+" @echo " " api: $(MAKE) -C lib/libaubit4gl api #Build Lex plug-in for generating Perl output perl.compiler: ${MAKE} -C lib/liblex/lex_perl @echo Aubit 4gl Perl-code generating version LEX library created #Make and install aubit4gl_pl.pm SWIG wrapper for libaubit4gl.so so generated #Perl code can utilise Aubit library and its plug-ins perl.lib: #Perl created makefile will remove domake when running "clean", so we better make #sure we have it: ./config.status --file lib/swig/domake cd lib/swig; sh domake @echo Aubit 4gl Perl module/wrapper for libaubit4gl installed test.perl: ${MAKE} -C tools/test test.perl clean.perl: ${MAKE} -C lib/liblex/lex_perl clean #WARNING - Perl created makefile will remove domake when running "clean" if test -f lib/swig/?akefile ; then mv lib/swig /tmp/swig-makefile; fi #Must allow it to fail, as we may or may not have makefile allready created there -if test -f lib/swig ; then ${MAKE} -C lib/swig clean ; fi if test -f /tmp/swig-makefile ; then mv /tmp/swig-makefile lib/swig/Makefile; fi ######################################## #Release a file to SourceForge Released Files download site release: # sf-upload -pr projectname -p packagename -r releasename -f file # [-type type] [-processor processor] [-user user] [-password password] # [-d releasedate] # [-n notes | -nf notesfile] [-c changes | -cf changesfile] # [-[no]ftp] [-[no]rc] [-[no]v] [-version] # ~/.sfuploadrc # You can put configuration options to this file. The format is # key = value # Allowed keys are: "user", "password", and "debug". sf-upload -pr aubit4gl -p "Aubit4gl-manual" -r "0.59-21" -f /tmp/HTML-Parser-3.55.tar.gz -user afalout # sf-upload -pr aubit4gl -p "Aubit Reasonably Stable Source" -r "1.0" -f file # sf-upload -pr aubit4gl -p "Aubit Reasonably Stable Binary" -r 1.0" -f file #... #Net::FTP=GLOB(0x869a07c)>>> QUIT #Net::FTP=GLOB(0x869a07c)<<< 221 Goodbye. #Login to sourceforge #make: *** [release] Segmentation fault ## ================================================================== ## DoxyGen doccumentation creation ## ================================================================== doxy: docs/doxy/html/index.html docs/doxy/html/index.html: #FIXME - Use Autoconf @DOXYGEN@ here ifneq "${DOXYGEN}" "no" ${MAKE} doxy.make #FIXME: use Autoconf variable here: ifneq "${WWW_DOCUMENT_ROOT}" "" ${MAKE} doxy.install.www endif #FIXME: this is wrong - check if cgi-bin dir exists ifneq "${CGI_DIR}" "" ${MAKE} doxy.install.search endif @echo DoxyGen source code documentation generated. @echo To use it, open file 'docs/doxy/html/index.html' in your web browser else @echo "Sorry, DOXYGEN not detected" endif doxy.make: rm -rf docs/doxy/html ${DOXYGEN} docs/doxy/Doxyfile @echo DoxyGen doccumentation created and placed in docs/doxy/html doxy.install.www: rm -rf ${WWW_DOCUMENT_ROOT}/${DOXY_WWWPATH}/html ${MKPATH} ${WWW_DOCUMENT_ROOT}/${DOXY_WWWPATH} cp -r docs/doxy/html ${WWW_DOCUMENT_ROOT}/${DOXY_WWWPATH}/html cd ${WWW_DOCUMENT_ROOT}/${DOXY_WWWPATH}/html; doxytag -s search.idx @echo DoxyGen doccumentation installed in web server path : @echo ${WWW_DOCUMENT_ROOT}/${DOXY_WWWPATH}/html @echo Point your web browser to ${WWW_HOST_NAME}/${DOXY_WWWPATH}/html/index.html doxy.install.search: ${MKPATH} ${CGI_DIR} ${CP} docs/doxy/html/doxysearch.cgi ${CGI_DIR} #run docs/doxy/html/installdox to replace any dummy links: @docs/doxy/html/installdox ## ================================================================== ## Strip ## ================================================================== #cuts size by more then 50%, but it makes it difficult to debug the core dumps #if the debugging info has been stripped out. # It should be optional, at most. The increased size does not impact the # runtime performance or memory usage; it only affects the amount of disk # space used to store the programs (and the amount of time taken to # distribute a binary distribution over a network). #It should be implemented in the make file that created the executable strip: cd bin; strip 4glc fcompile cd lib; strip *${SO_EXT} ## ================================================================== ## Clean ## ================================================================== #FIXME: "clean" should clean intermediate files resulting from compile, but will skip #executables and objects that are needed for instalation. After "clean", it should #still be possiblt to do "make install" clean: clean.all @echo "Cleaned.." #will clean EVERYTHING that is not source file from CVS distclean: clean.all clean.tools clean.aubitbuild clean.distclean clean.config @echo Aubit 4gl compiler source tree now distribution clean clean.distclean: -$(MAKE) -C tools/fgldoc distclean #will clean EVERYTHING that is not source file from CVS appart from Autoconf generated stuff clean.all: cleanall cleanall: clean.root clean.bin clean.etc clean.incl clean.docs clean.install \ clean.swig clean.project clean.liblogical clean.perl clean.rest @echo Cleaning Aubit 4gl temporary compiler files and compiled objects... $(MAKE) -C lib clean || true $(MAKE) -C lib/libui/ui_console clean || true $(MAKE) -C lib/libui/ui_curses clean || true # $(MAKE) -C lib/libui/ui_gtk clean || true $(MAKE) -C lib/extra_libs/file clean || true $(MAKE) -C lib/extra_libs/pick clean || true $(MAKE) -C lib/extra_libs/string clean || true $(MAKE) -C lib/extra_libs/roman clean || true $(MAKE) -C lib/libexdata clean || true $(MAKE) -C lib/libpacker/packed clean || true $(MAKE) -C lib/libpacker/perl clean || true $(MAKE) -C lib/libpacker/xdr clean || true $(MAKE) -C lib/libpacker/xml clean || true $(MAKE) -C compilers/4glc/rules clean || true $(MAKE) -C compilers/4glc clean || true $(MAKE) -C compilers/sql clean || true ${RM} -f bin/formgen_4gl bin/make_binfiles bin/xgen_new bin/fglproto bin/4glc_opt || true #$(MAKE) -C compilers/pcode clean || true $(MAKE) -C tools/extras_compile clean || true $(MAKE) -C compilers/fcompile clean || true $(MAKE) -C compilers/menus clean || true $(MAKE) -C compilers/ace clean || true $(MAKE) -C compilers/helpcompile clean || true $(MAKE) -C compilers/xgen clean || true $(MAKE) -C common/dataio clean || true ${RM} lib/swig/lib_wrap.doc $(MAKE) -C tools/test clean || true $(MAKE) -C tools/test/gui clean || true $(MAKE) -C tools/convertsql clean || true $(MAKE) -C tools/4glpc clean || true $(MAKE) -C tools/adbschema clean || true $(MAKE) -C tools/afinderr clean || true $(MAKE) -C tools/configuration clean || true $(MAKE) -C tools/asql clean || true $(MAKE) -C tools/a4gl clean || true $(MAKE) -C tools/misql clean || true $(MAKE) -C tools/aupscol clean || true $(MAKE) -C tools/adbload2 clean || true $(MAKE) -C help clean || true $(MAKE) -C glade/ide clean || true $(MAKE) -C lib/extra_libs/errhook clean || true $(MAKE) -C compilers/wsdl2fgl clean || true @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Aubit 4gl compiler source tree is now clean |" @echo "| NOTE: tools tree not cleaned (use 'make clean.tools') |" @echo "+--------------------------------------------------------------------+" @echo " " #user is expected to manually invoke this, so we save some time since usually #we just want to clean compiler: clean.tools: $(MAKE) -C tools/test/db clean $(MAKE) -C tools/test/db/informix clean $(MAKE) -C tools/test/db/postgresql clean $(MAKE) -C tools/test/lang clean $(MAKE) -C tools/test/regression clean $(MAKE) -C tools/ide clean $(MAKE) -C tools/html clean $(MAKE) -C tools/jabber clean $(MAKE) -C tools/misql clean $(MAKE) -C tools/adbload clean $(MAKE) -C tools/odbctest clean $(MAKE) -C tools/4gl_beautify/dbbeauty clean $(MAKE) -C tools/4gl_beautify/iid clean $(MAKE) -C tools/4gl_beautify/infmx_tidy clean $(MAKE) -C tools/4glunit clean -$(MAKE) -C tools/fgldoc clean (cd tools/4gltree; ${RM} *.bak) (cd tools/metrics_4gl; ${RM} *.bak) @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Aubit 4gl compiler TOOLS source tree is now clean |" @echo "+--------------------------------------------------------------------+" @echo " " #This will clean everything created with Autoconf configure script: clean.config: clean.configure clean.configure: clean.makefiles clean.settings clean.splint #"configure" _IS_ in CVS ${RM} config.log config.status incl/config.h incl/a4gl_incl_config.h \ docs/doxy/Doxyfile etc/aubit-rpm.spec configure.lineno libtool \ bin/aubitbuild.sh etc/aubit-InnoSetup.iss incl/stamp-h compilers/4glc/mk_states_c clean.settings: ${RM} etc/a4glrc etc/aubitbuild.mk etc/aubitenv etc/aubitrc clean.makefiles: ${RM} -f compilers/4glc/rules/Makefile \ compilers/fcompile/Makefile compilers/helpcompile/Makefile \ incl/Makefile-common \ lib/libui/ui_console/Makefile lib/libpdf/Makefile \ lib/libsql/nosql/Makefile \ lib/extra_libs/string/Makefile lib/libui/ui_curses/Makefile \ tools/test/db/Makefile tools/test/lang/Makefile \ tools/test/regression/Makefile tools/test/db/Makefile \ lib/liblex/lex_4gl/Makefile \ lib/libpacker/mempacked/Makefile \ tools/test/ace/Makefile \ tools/misql/Makefile tools/adbload/Makefile \ tools/ide/Makefile \ tools/odbctest/Makefile \ tools/test/gui/Makefile \ compilers/ace/Makefile \ lib/libform/form_xdr/Makefile lib/libform/noform/Makefile \ lib/libmsg/msg_native/Makefile lib/libpacker/packed/Makefile \ lib/libpacker/perl/Makefile lib/libpacker/xdr/Makefile \ lib/libpacker/xml/Makefile lib/librpc/no_rpc/Makefile \ lib/librpc/sun_rpc/Makefile lib/librpc/xml_rpc/Makefile \ lib/resource/Makefile tools/loadmap/Makefile \ lib/liblex/lex_c/Makefile lib/liblex/lex_perl/Makefile \ lib/liblex/lex_esqlc/Makefile \ lib/libexdata/Makefile lib/libsql/postgresql/Makefile \ lib/libform/form_generic/Makefile \ lib/libsql/sapdb/Makefile tools/4glunit/Makefile \ tools/test/db/informix/Makefile tools/test/db/postgresql/Makefile \ tools/fgldoc/Makefile clean.splint: ${RM} lclint.log compilers/fcompile/lclint.log compilers/helpcompile/lclint.log \ compilers/menus/lclint.log lib/libaubit4gl/lclint.log clean.root: #We must not clean *.log when running make process to make.log: #we must not clean *.tmp because of unixbuildnames.tmp: $(RM) *.bak *.BAK libincl .*.bak core cyrpc.flg debug.out \ *.err ${PLATFORMINFO} make.log commit.log rpmbuild.log \ aubit4gl.lsm rpmbuild.log .\#* aubit4glsrc-*-*.txt rm -rf autom4te.cache #stuff created by aubitbuild.sh: clean.build: clean.aubitbuild clean.aubitbuild: ${RM} tmpdlpage1.html aubitdownload.htm tmpdlpage2.html aubitdownload-template.htm \ cybuildnames.tmp unixbuildnames.tmp unixsrcbuildnames.tmp cysrcbuildnames.tmp \ warning.log #FIXME: move this to appropriate makefile : ${RM} compilers/fcompile/fshow.glb compilers/fcompile/fshow.h \ tools/ide/debug.out tools/misql/debug.out *.${ARCHEXT} *.htm *.html *.tmp clean.rpc: ${RM} compilers/fcompile/form_x_xdr.c compilers/menus/menu_x_xdr.c \ compilers/fcompile/form_x.h compilers/menus/menu_x.h clean.bin: #dont clean aubitbuild.sh - this is Autoconf generated file (cd bin;${RM} 4glc${EXE} fcompile${EXE} mcompile${EXE} mkmess${EXE} \ mcompile-noodbc${EXE} loadmap${EXE} \ *.bak .*.bak ide${EXE} fcompile-noodbc${EXE} 4glc-noodbc${EXE} \ 4glp${EXE} mdecompile${EXE} fdecompile${EXE} fdecompile-j${EXE} \ aubit-config${EXE} fshow${EXE} odbctest-*${EXE} \ aace${EXE} aace_4gl${EXE} aace_perl${EXE} adecompile${EXE} xgen${EXE} dbbeauty${EXE} *.err \ iid${EXE} infmx_tidy${EXE} *.4ae *-strip${EXE} \ convertsql${EXE} *.warn unmkmessage${EXE} amkmessage${EXE} default_frm${EXE} afinderr${EXE} \ *.afr.dat *.afr.xml configurator${EXE} *.hlp \ checker${EXE} runner_fgl${EXE} asql${EXE} aupscol${EXE} \ *~ 4glpc${EXE} \ ) clean.etc: ${RM} etc/*.bak etc/*~ etc/config/*.bak etc/config/*~ etc/aubit-auto.spec \ etc/*.hlp etc/*.afr.* rm -rf etc/Output #Cant do a4gl_API_* because a4gl_API_exdata.h is NOT generated #Note anymore - renamed to incl/a4gl_exdata.h apparently clean.incl: ${RM} incl/*.bak incl/\#* incl/*~ ${RM} incl/a4gl_API_esql.h \ incl/a4gl_API_esql_lib.h incl/a4gl_API_packer.h \ incl/a4gl_API_packer_lib.h \ incl/a4gl_API_exreport.h incl/a4gl_API_rpc.h \ incl/a4gl_API_exreport_lib.h incl/a4gl_API_rpc_lib.h \ incl/a4gl_API_form.h incl/a4gl_API_sql.h \ incl/a4gl_API_form_lib.h incl/a4gl_API_sql_lib.h \ incl/a4gl_API_help.h incl/a4gl_API_sqlparse.h \ incl/a4gl_API_help_lib.h incl/a4gl_API_sqlparse_lib.h \ incl/a4gl_API_menu.h incl/a4gl_API_ui.h \ incl/a4gl_API_menu_lib.h incl/a4gl_API_ui_lib.h clean.docs: rm -rf docs/doxy/html ${RM} docs/doxy/*.bak docs/*.bak clean.install: rm -rf install clean.swig: @if [ -f lib/swig/?akefile ]; then \ $(MAKE) -C lib/swig clean; \ fi (cd lib/swig; ${RM} lib_wrap.c *.old *.bak aubit4gl_pl.pm domake) clean.project: (cd tools/project; ${RM} *.bak .\#*) (cd tools/cygwin; ${RM} *.bak) ## ================================================================== ## Install ## ================================================================== #FIXME: this should use ${INSTALL} #make icons for KDE and GNOME: to IDE, to manual #all targets common to installing compiled source code AND installing #binary distributions are in here: #THIS INCLUDE MUST BE HERE SINCE IT STARTS WITH A TARGET!!!! include incl/Makefile-install.mki #remaining install related targets defined here are used only when installing #from compiled source code tree. install: ./bin/4glc install.all @echo " " @echo "+--------------------------------------------------------------------+" @echo "| Aubit compiler installed to $(INSTALL_DIR)" @echo "| You can test the installation by executing: |" @echo "| cd $(INSTALL_DIR)/tools/test; make " @echo "| You can check that all got installed with 'make install.check' |" @echo "+--------------------------------------------------------------------+" @echo " " @echo "Thank you for using Aubit 4gl compiler" @echo " " install.all: install.core install.Makefile-common install.setmod install.example \ install.manual install.config \ install.bin.links install.aubitrc install.libs.links \ install.makefile-install install.libs.conf install.registry.bin ifneq "${AUBITRCFILEEXISTS}" "" @echo " " @echo "WARNING: Configuration file aubitrc exists in ${AUBITETC}/aubitrc" @echo "====================== WILL NOT OVERWRITE ======================" @echo "use 'make install.aubitrc aubitrc=new' if you want to do that " @echo "Automatically created aubitrc placed in /tmp/aubitrc.tmp" @echo " " endif #WARNING: for some reason (sic!) assigning variables here MUST happen #on the beggining of the line: ifeq "${INSTALLDIR}" "" INSTALLDIR=${INSTALL_DIR} endif ifeq "${SOURCEDIR}" "" SOURCEDIR=${AUBIT_SRC_ROOT} endif ######################## #Check that 'make install' installed everything we expect, and not things #we dont expect/want: install.check: export MAKINGAUBIT=0; export SOURCEDIR="${SOURCEDIR}";export INSTALLDIR="${INSTALLDIR}"; \ ${SH} bin/4glpc.obsolete -chk-install ######################## #Check that Windows setup installed everything we expect, and not things (FULL LOOP) install.check.winsetup: winsetup winsetup.check ######################### #Main target for checking windows installer files consistency #also invoked from aubitbuild.sh winsetup.check: winsetup.deinstall install.winsetup.silent install.check.winsetup.compare #EXEC="make winsetup.deinstall"; runexec @echo "WinSetup checks OK" ######################## #deinstall Windows setup winsetup.deinstall: #/SILENT shows only progress indicator, /VERYSILENT not even that -d:/tmp/aubit4gl-silent/unins000.exe /VERYSILENT #Should be gone, but just in case: rm -rf d:/tmp/aubit4gl-silent ######################## #check files installed by Windows setup executable install.check.winsetup.compare: export MAKINGAUBIT=0; export INSTALLDIR="d:/tmp/aubit4gl-silent" ;${SH} bin/4glpc.obsolete -chk-install ######################## #Check that RPM installed everything we expect, and not things #install.check.rpm: # export MAKINGAUBIT=0; export INSTALLDIR="xxyyzz" ;${SH} bin/4glpc.obsolete -chk-install #remove above? ######################## #install compiler core files install.core: install.tree $(CP) ${TOSETTINGS} $(FGLPC_SETTINGS_DEST) ${CP} $(TOBIN) $(BIN_DEST) $(CP) $(TOROOT) $(ROOT_DEST) $(CP) $(TOINCL) $(INCL_DEST) $(CP) $(TODATAIOINCL) $(DATAIOINCL_DEST) $(CP) $(TOLIB) $(LIB_DEST) $(CP) $(TOPLUGIN) $(PLUGIN_DEST) @echo Aubit 4gl core compiler files installed #Prepare and install Makefile-common make include install.Makefile-common: install.Makefile-common.in #This is just a fake to have a file as include # @echo "#AUBIT_BIN_INSTALL is needed for make files and 4glpc to know they are not in Aubit compiler source code tree:" > /tmp/Makefile-common # @echo "AUBIT_BIN_INSTALL=1" >> /tmp/Makefile-common # @cat $(INCL_DIR)/Makefile-common >> /tmp/Makefile-common # @mv /tmp/Makefile-common $(INCL_DEST) # ${RM} /tmp/Makefile-common echo " " > $(INCL_DEST)/Makefile-common install.Makefile-common.in: @echo "#AUBIT_BIN_INSTALL is needed for make files and 4glpc to know they are not in Aubit compiler source code tree:" > /tmp/Makefile-common.in @echo "AUBIT_BIN_INSTALL=1" >> /tmp/Makefile-common.in @cat $(INCL_DIR)/Makefile-common.in >> /tmp/Makefile-common.in #Make this variables permanent, so we can use then when installing binary #packages - they wont be changing anyway: cat /tmp/Makefile-common.in | sed -e 's/@AUBIT_VERSION@/${AUBIT_VERSION}/g' \ -e 's/@AUBIT_BUILD@/${AUBIT_BUILD}/g' \ -e 's/@COMPILE_DATE@/${COMPILE_DATE}/g' \ -e 's/@target@/${target}/g' \ -e 's/@target_os@/${target_os}/g' > $(INCL_DEST)/Makefile-common.in #@mv /tmp/Makefile-common.in $(INCL_DEST) ${RM} /tmp/Makefile-common.in #script to enable configure emphasis display: ${CP} tools/project/shtool $(INSTALL_DIR)/bin/shtool #set file level permisions and attributes install.setmod: chmod a+x $(BIN_DEST)/* #install configuration settings install.config: install.home $(CP) ${TOETC} $(ETC_DEST) $(CP) ${TOCONVSQL} $(CONVSQL_DEST) $(CP) ${TOIMPORT} $(IMPORT_DEST) @echo "Configuration examples installed to $(INSTALL_DIR)/etc" #Install files in user's home directory install.home: ifneq "${TOHOME}" "" $(CP) ${TOHOME} $(HOME_DEST) endif #Example files install.example: # $(CP) $(TOTEST) $(TEST_DEST) $(CP) $(TOTEST_STD) $(TEST_DEST_STD) $(CP) $(TOTEST_GUI) $(TEST_DEST_GUI) @echo Aubit 4gl compiler programming examples are now installed #Documentation files install.manual: $(CP) $(TODOCS) $(DOC_DEST) # $(CP) $(TODOCS2) $(DOC_DEST)/manual/html @echo Aubit 4gl compiler manual is now installed #install IDE binary files #This is not done by default. Check if user compiled IDE first install.ide: ${MAKE} -C tools/ide install.aubit @echo Aubit 4gl compiler IDE is now installed #Install IDE source files in Aubit installation tree pack.ide: ${CP} ${TOIDE} $(IDE_DEST) #Create installation tree install.tree: ${MKPATH} $(BIN_DEST) $(LIB_DEST) $(ETC_DEST) $(FGLPC_SETTINGS_DEST) \ ${PLUGIN_DEST} \ $(INCL_DEST) $(TEST_DEST)/gui $(DOC_DEST) ${CONVSQL_DEST} ${IMPORT_DEST} ${MKPATH} $(INCL_DEST)/dataio @echo "Aubit 4gl compiler instalation tree created" #FIXME: we need to chown installation tree to something, since installation has #to be run as root - or use "install" utility? #FIXME: we must chech is user is "root" before installing install.makefile-install: ${CP} etc/Makefile-install $(ROOT_DEST)/Makefile ${CP} incl/Makefile-install.mki $(INCL_DEST) ${CP} -r etc/config/ $(ETC_DEST) ${CP} etc/aubitrc.in $(ETC_DEST)/aubitrc-bin.in ${CP} configure $(ROOT_DEST) deinstall: deinstall.all ## ================================================================== ## P-code runner registration ## ================================================================== #See #http://www.tat.physik.uni-tuebingen.de/~rguenth/linux/binfmt_misc.html #On linux - if you have binfmt_misc in the kernel (or loaded as a module ) #you can get the kernel to run a program to run a program. This is normally #used for running java or C# code, but we can use it for running aubit pcode #bin_fmt registration. #----------------------- #Register p-code runner with kernel (Linux with binfmt_misc support in kernel ONLY) pcode.register: binfmt.boot binfmt.activate binfmt.status @echo "Binfmt activation complete" #----------------------- #Full circle - needed when setings change (you cant just register new value, #updates are not possible - you have to delete everything first) pcode.re-register: binfmt.disable binfmt.clear binfmt.sh.delete binfmt.boot \ binfmt.activate binfmt.status binfmt.enable @echo "Binfmt activation complete" #----------------------- #Try to activate binfmt support by runing a script binfmt.activate: /proc/sys/fs/binfmt_misc/register $(INSTALL_DIR)/bin/runner_fgl_wrapper /usr/bin/register_binfmt.sh #TODO: remove compilers/pcode/register ifndef COMSPEC #Load binfmt_misc module in runningn kernel: su -c "${SH} /usr/bin/register_binfmt.sh" endif #----------------------- #De-registers all previously registeres formats: binfmt.clear: /proc/sys/fs/binfmt_misc/status su -c "echo -1 > $<" ${MAKE} binfmt.status #----------------------- #Disable binfmt support binfmt.disable: /proc/sys/fs/binfmt_misc/status su -c "echo 0 > $<" ${MAKE} binfmt.status #----------------------- #Enable binfmt support binfmt.enable: /proc/sys/fs/binfmt_misc/status su -c "echo 1 > $<" ${MAKE} binfmt.status #----------------------- #Show binfmt support status binfmt.status: /proc/sys/fs/binfmt_misc/status @echo "----------------------------------------------" @echo "binfmt_misc status is:" -@cat /proc/sys/fs/binfmt_misc/status @echo " " @echo "----------------------------------------------" @echo "A4GL interpreter configuration:" -@cat /proc/sys/fs/binfmt_misc/A4GL @echo "----------------------------------------------" #----------------------- #Check for presense of Aubit P-code wrapper script in installation location: $(INSTALL_DIR)/bin/runner_fgl_wrapper: @echo "YOU NEED TO INSTALL AUBIT COMPILER FIRST! (make install)" @exit 1 #----------------------- #Remove existing script binfmt.sh.delete: /usr/bin/register_binfmt.sh su -c "${RM} $^" #----------------------- #Create binfmt registration script: binfmt.sh: /usr/bin/register_binfmt.sh /usr/bin/register_binfmt.sh: su -c "touch $@; chmod a+rwx $@;" @echo "#!/bin/sh/" > $@ @echo "# this is to add the supported binary formats via binfmt_misc" >> $@ @echo "" >> $@ @echo "if test ! -e /proc/sys/fs/binfmt_misc ; then" >> $@ @echo " modprobe binfmt_misc" >> $@ @echo "fi" >> $@ @echo "" >> $@ @echo "if test -e /proc/sys/fs/binfmt_misc ; then" >> $@ # @echo " echo ':Wine:M::MZ::/usr/local/bin/wine:' \> /proc/sys/fs/binfmt_misc/register" >> $@ # @echo " echo ':Java:M::\xca\xfe\xba\xbe::/usr/local/java/bin/javawrapper:' \> /proc/sys/fs/binfmt_misc/register" >> $@ # @echo " echo ':HTML:E::html::/usr/local/java/bin/appletviewer:' \> /proc/sys/fs/binfmt_misc/register" >> $@ # @echo " echo ':Applet:M::