|
|
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Can I generate parameters for UMK?
Can I generate parameters for UMK? [message #43538] |
Wed, 27 August 2014 09:42 |
|
Can I generate command-line parameters for umk like export makefile for the package compiling.
Maybe it's not difficult to adding to ide...
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
|
|
Re: Can I generate parameters for UMK? [message #44372 is a reply to message #44371] |
Mon, 02 March 2015 05:51 |
|
By the way, one more question:
Can I write config (command-line parameters set) for UMK for compile in situation when path for MyApps every time is different?
(I try to config automatic build farm on Teamcity, but building envirenment every time is path like:
/home/build/agent/2015-01-15/ag0123654/MyApps/
Every time I must recreate MyApps.var with actual path
/home/build/agent/2015-01-15/ag0123654/MyApps/ )
There is second form of umk-parameters set, where not need to point of name of Package-Assembly.
May be, you have idea, how to simplest way transform command-line parameters of umk to second form?
How to specify umk to make as Makefile, path-independent (proceeding from the current path).
May be, you have idea, how to simplest way transform commited decision to suggested form ?
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
[Updated on: Mon, 02 March 2015 06:06] Report message to a moderator
|
|
|
|
Re: Can I generate parameters for UMK? [message #44378 is a reply to message #44373] |
Mon, 02 March 2015 11:48 |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
sergeynikitin wrote on Mon, 02 March 2015 04:51Can I write config (command-line parameters set) for UMK for compile in situation when path for MyApps every time is different?
I didn't find such command line option(s).
There is a possibility to create a different assemblies with these paths and use them instead.
The current version of umk searches assemblies and build methods in the following directories (in order):
${HOME}/.upp/umk
${HOME}/.upp/theide
${HOME}/.upp/ide
${HOME}
executable directory
So, it is possible to create (unique) assemblies (and/or build methods) in these directories.
sergeynikitin wrote on Mon, 02 March 2015 04:55May be, We can generate Makefile based on umk calls, but not on gcc calls?
This is possible, if you want to use umk (or theide) to build different packages. But I think, this is out of scope of current version, which might be used to understand about possible command line options, related to building.
I can give you examples, which you might adapt to your needs. They build some packages from examples assembly.
The batch file example (build.bat, e.g. for Windows operating system(s)):
@echo off
setlocal
set CURDIR=%~dp0
set UPPDIR=C:\upp
set BUILDMETHOD=MSC9
set BUILDOPTIONS=-r
rem Empty to default package configuration
set MAINCONF=
set ASSEMBLY=examples
set PACKAGES=AddressBook;Puzzle;UWord
set OUTPUTDIR=%CURDIR%build
rem theide or umk
set BUILDER=theide
if exist "%OUTPUTDIR%" (rmdir /S /Q "%OUTPUTDIR%")
mkdir "%OUTPUTDIR%"
cd "%UPPDIR%"
for %%P in (%PACKAGES%) do (
%BUILDER% %ASSEMBLY% %%P %BUILDMETHOD% %BUILDOPTIONS% %MAINCONF% "%OUTPUTDIR%" || exit /B
)
The shell file example (build.sh, e.g. for Unix-like operating system(s)):
#!/bin/sh
CURDIR=${PWD}
BUILDMETHOD=GCC
BUILDOPTIONS=-rs
# Empty to default package configuration
MAINCONF=
ASSEMBLY=examples
PACKAGES="AddressBook Puzzle UWord"
OUTPUTDIR=${CURDIR}/build
# theide or umk
BUILDER=theide
# Remove output directory
if [ -e "${OUTPUTDIR}" ]; then
rm -rf "${OUTPUTDIR}"
fi;
# Create output directory with intermediate directories, if needed
mkdir -p "${OUTPUTDIR}"
for P in ${PACKAGES}; do
${BUILDER} ${ASSEMBLY} ${P} ${BUILDMETHOD} ${BUILDOPTIONS} ${MAINCONF} "${OUTPUTDIR}" || break
done;
The Makefile example:
CURDIR= $(PWD)
BUILDMETHOD= GCC
BUILDOPTIONS= -rs
# Empty to default package configuration
MAINCONF=
ASSEMBLY= examples
PACKAGES= AddressBook Puzzle UWord
OUTPUTDIR= $(CURDIR)/build
# theide or umk
BUILDER= theide
all: clean build
build: create_output_dir $(PACKAGES)
$(PACKAGES):
${BUILDER} ${ASSEMBLY} $@ ${BUILDMETHOD} ${BUILDOPTIONS} ${MAINCONF} "${OUTPUTDIR}"
create_output_dir:
mkdir -p "$(OUTPUTDIR)"
clean:
rm -rf "$(OUTPUTDIR)"
.PHONY: all
The more advanced build files need to create in case of build packages with different main configuration(s).
[Updated on: Mon, 02 March 2015 14:43] Report message to a moderator
|
|
|
Re: Can I generate parameters for UMK? [message #44491 is a reply to message #44372] |
Tue, 17 March 2015 09:54 |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
sergeynikitin wrote on Mon, 02 March 2015 04:51Can I write config (command-line parameters set) for UMK for compile in situation when path for MyApps every time is different?
Looks like, it's possible to specify nest directories of assembly instead of assembly name, in case of umk. It's called "Inline assembly".
For example, there is a possibility to use following ASSEMBLY value (in case of U++ local installation to "${HOME}/upp" directory) for above (Unix-like) examples:
ASSEMBLY= "${HOME}/upp/examples,${HOME}/upp/uppsrc"
i.e. nest directories per ',' (and/or ':' for Unix-like).
|
|
|
Goto Forum:
Current Time: Thu Jan 02 22:50:48 CET 2025
Total time taken to generate the page: 0.05712 seconds
|
|
|