Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » Can I generate parameters for UMK?
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
|
|
|
Goto Forum:
Current Time: Sun May 12 20:15:12 CEST 2024
Total time taken to generate the page: 0.01978 seconds
|