mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-10 14:22:46 -06:00
Enable Flags in Makefiles (same as umk), fix Makefiles 'clean' rules and update rpm history
git-svn-id: svn://ultimatepp.org/upp/trunk@10815 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
1702b18a71
commit
c16103d39b
4 changed files with 49 additions and 25 deletions
|
|
@ -14,10 +14,10 @@ install:
|
|||
+./doinstall --verbose
|
||||
|
||||
clean:
|
||||
if [ "$(UPPOUT)" != "" -a -d "$(UPPOUT)" ] ; then \
|
||||
rm -fr "$(UPPOUT)" ; \
|
||||
if [ -d "$(UPPOUT)" ] ; then \
|
||||
rm -fr "$(UPPOUT)" ; \
|
||||
else \
|
||||
rm -fr uppsrc/_out ; \
|
||||
rm -fr uppsrc/_out ; \
|
||||
fi
|
||||
rm -f uppsrc/ide.out
|
||||
rm -f uppsrc/umk.out
|
||||
|
|
|
|||
|
|
@ -57,18 +57,18 @@ show_usage()
|
|||
echo ' --help : show current usage information'
|
||||
echo
|
||||
echo 'Note:'
|
||||
echo ' * domake use environment variables to supersede auto generated variables and those from uppsrc/Makefile.in:'
|
||||
echo ' * domake use environment variables to supersede auto generated variables and those from uppsrc/*Makefile.in:'
|
||||
echo ' - CXX : c++ compiler'
|
||||
echo ' - CXXFLAGS : c++ compiler flags'
|
||||
echo ' - UPPOUT : U++ output directory'
|
||||
echo ' - UPPOUT : U++ output directory (full path)'
|
||||
echo " - CINC : default include directory list (use ';' as separator)"
|
||||
echo ' - Macro : U++ macro (ex: -DflagLINUX)'
|
||||
echo ' - Flags : U++ build flags (ex: +GUI,LINUX,POSIX,SHARED)'
|
||||
echo ' - LINKER : linker binary name'
|
||||
echo ' - LDFLAGS : linker extra flags'
|
||||
echo " - LIBPATH : library path list (use ';' as separator)"
|
||||
echo ' - AR : archive-maintaining program'
|
||||
echo
|
||||
echo 'Example: CXX=g++ UPPOUT=$HOME/tmp ./domake'
|
||||
echo 'Example: CXX=g++ Flags=+GUI,MT,GCC,SHARED,LINUX,POSIX UPPOUT=$HOME/tmp ./domake'
|
||||
}
|
||||
|
||||
# log_debug_info "Processing parameters"
|
||||
|
|
@ -156,10 +156,10 @@ then
|
|||
CXX="clang++"
|
||||
log_debug_info "Force CXX=$CXX for $platform"
|
||||
fi
|
||||
if [ "$Macro" = "" ]
|
||||
if [ "$Flags" = "" ]
|
||||
then
|
||||
Macro="-DflagCLANG -DflagNOGTK -DflagGUI -DflagMT -DflagSHARED -DflagOSX -DflagPOSIX"
|
||||
log_debug_info "Force Macro='$Macro' for $platform"
|
||||
Flags="+CLANG,NOGTK,GUI,MT,SHARED,OSX,POSIX"
|
||||
log_debug_info "Force Flags='$Flags' for $platform"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
|
@ -301,10 +301,10 @@ then
|
|||
make_parameter_array[i++]="-e"
|
||||
make_parameter_array[i++]="CINC=$CINC"
|
||||
fi
|
||||
if [ "$Macro" != "" ]
|
||||
if [ "$Flags" != "" ]
|
||||
then
|
||||
make_parameter_array[i++]="-e"
|
||||
make_parameter_array[i++]="Macro=$Macro"
|
||||
make_parameter_array[i++]="Flags=$Flags"
|
||||
fi
|
||||
if [ "$LINKER" != "" ]
|
||||
then
|
||||
|
|
@ -336,7 +336,6 @@ then
|
|||
done
|
||||
|
||||
log_debug_info "Extra parameters will supersede default parameters"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -345,7 +344,7 @@ log_debug_info "Configuring uppsrc/Makefile, uppsrc/uMakefile, GCC.bm and CLANG.
|
|||
if which pkg-config
|
||||
then
|
||||
|
||||
if [[ "$Macro" = *"-DflagNOGTK"* ]]
|
||||
if [[ "$Flags" = *"NOGTK"* ]]
|
||||
then
|
||||
requires_libraries="x11 libnotify freetype2"
|
||||
else
|
||||
|
|
@ -387,7 +386,7 @@ then
|
|||
|
||||
fi
|
||||
|
||||
if [[ "$Macro" = *"-DflagNOGTK"* ]]
|
||||
if [[ "$Flags" = *"NOGTK"* ]]
|
||||
then
|
||||
log_debug_info "Removing references to GTK+"
|
||||
sed -i.backup \
|
||||
|
|
@ -450,7 +449,7 @@ else
|
|||
$make_binary -C uppsrc -e CXX="$CXX" "${make_parameter_array[@]}"
|
||||
|
||||
fi
|
||||
if [ "$build_umk" = "true" ]
|
||||
if [ "$build_umk" = "true" ] # It doesn't matter if we define flags like GTK, NOGTK, X11 or GUI. umk is console based and won't use them.
|
||||
then
|
||||
$make_binary -C uppsrc -e CXX="$CXX" "${make_parameter_array[@]}" -f uMakefile
|
||||
|
||||
|
|
|
|||
|
|
@ -205,6 +205,25 @@ rm -fr %{buildroot}
|
|||
#---------
|
||||
%changelog
|
||||
* %date Amrein-Marie Christophe <camreinmarie@free.fr> %version-1
|
||||
- New snapshot
|
||||
|
||||
* Tue Jan 31 2017 Amrein-Marie Christophe <camreinmarie@free.fr> 2017.1-1
|
||||
- New release
|
||||
- Rename package (upp -> upp-devel)
|
||||
- Obsoletes old upp package
|
||||
- Use default Makefile to build and install U++
|
||||
- Update BuildRequires and Requires for all platforms
|
||||
- Enable clang++ for distribution with gcc version < 4.9.0
|
||||
- Build and add umk binary
|
||||
- Add theide and umk man pages
|
||||
|
||||
* Thu Nov 08 2012 Amrein-Marie Christophe <camreinmarie@free.fr> 5485-1
|
||||
- New release
|
||||
|
||||
* Fri Oct 26 2012 Amrein-Marie Christophe <camreinmarie@free.fr> 5431-1
|
||||
- New release
|
||||
|
||||
* Tue Jan 31 2012 Amrein-Marie Christophe <camreinmarie@free.fr> 4193-1
|
||||
- New release
|
||||
|
||||
* Fri Aug 15 2008 Amrein-Marie Christophe <camreinmarie@free.fr> 2008.1-1
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@ void MakeBuild::CleanPackage(const Workspace& wspc, int package)
|
|||
return;
|
||||
String outdir = OutDir(PackageConfig(wspc, package, GetMethodVars(method), mainconfigparam,
|
||||
*host, *builder), wspc[package], GetMethodVars(method));
|
||||
// TODO: almost perfect, but target will be detected after build. if build dosen't occure the target is empty :(
|
||||
// TODO: almost perfect, but target will be detected after build. if build does not occur the target is empty :(
|
||||
// How to make sure we know target? Target directory is where android project sandbox is.
|
||||
builder->target = target;
|
||||
builder->CleanPackage(wspc[package], outdir);
|
||||
|
|
@ -643,13 +643,18 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting)
|
|||
inclist << " -I" << includes[i];
|
||||
|
||||
makefile << "\n"
|
||||
"UPPOUT = " << (exporting ? "_out/" : GetMakePath(AdjustMakePath(host->GetHostPath(AppendFileName(uppout, ""))), win32)) << "\n"
|
||||
"CINC = " << inclist << "\n"
|
||||
"Macro = ";
|
||||
|
||||
"comma := ,\n"
|
||||
"empty :=\n"
|
||||
"space := $(empty) $(empty)\n"
|
||||
"\n"
|
||||
"Flags := ";
|
||||
for(int i = 0; i < allconfig.GetCount(); i++)
|
||||
makefile << " -Dflag" << allconfig[i];
|
||||
makefile << "\n";
|
||||
makefile << (i == 0 ? '+' : ',' ) << allconfig[i];
|
||||
makefile << "\n"
|
||||
"Macro := $(subst $(comma),$(space)-Dflag,$(subst +,-Dflag,$(strip $(Flags))))" "\n"
|
||||
"\n"
|
||||
"UPPOUT = " << (exporting ? "_out/" : GetMakePath(AdjustMakePath(host->GetHostPath(AppendFileName(uppout, ""))), win32)) << "\n"
|
||||
"CINC = " << inclist << "\n";
|
||||
|
||||
String output, config, install, rules, linkdep, linkfiles, linkfileend;
|
||||
|
||||
|
|
@ -718,8 +723,8 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting)
|
|||
<< rules
|
||||
<< ".PHONY: clean\n"
|
||||
<< "clean:\n"
|
||||
<< "\tif [ -d $(UPPOUT) ]; then rm -rf $(UPPOUT); fi;\n"
|
||||
<< "\tif [ -f build_info.h ]; then rm -f build_info.h; fi;\n";
|
||||
<< "\tif [ -d \"$(UPPOUT)\" ]; then rm -rf \"$(UPPOUT)\" ; fi\n"
|
||||
<< "\tif [ -f build_info.h ]; then rm -f build_info.h ; fi\n";
|
||||
|
||||
bool sv = ::SaveFile(fn, makefile);
|
||||
if(!exporting) {
|
||||
|
|
@ -735,3 +740,4 @@ String MakeBuild::GetInvalidBuildMethodError(const String& method)
|
|||
{
|
||||
return "Invalid build method " + method + " (" + GetMethodPath(method) + ").";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue