|
@@ -611,29 +611,15 @@ implementation
|
|
|
sl : TStringList;
|
|
|
begin
|
|
|
prefix:='REQUIRE_PACKAGES_';
|
|
|
-// slall:=FInput.GetTargetRequires(t_all);
|
|
|
reqs:='';
|
|
|
{ Add target defines }
|
|
|
for t:=low(ttarget) to high(ttarget) do
|
|
|
begin
|
|
|
sl:=FInput.GetTargetRequires(t);
|
|
|
- { optimize by removing the requires already in t_all }
|
|
|
-{ if t<>t_all then
|
|
|
- begin
|
|
|
- i:=0;
|
|
|
- while (i<sl.Count) do
|
|
|
- begin
|
|
|
- if (slall.IndexOf(sl[i])<>-1) then
|
|
|
- sl.Delete(i)
|
|
|
- else
|
|
|
- inc(i);
|
|
|
- end;
|
|
|
- end; }
|
|
|
if sl.count>0 then
|
|
|
begin
|
|
|
write(TargetStr[t]+' requires:');
|
|
|
-// if t<>t_all then
|
|
|
- FOutput.Add('ifeq ($(OS_TARGET),'+TargetStr[t]+')');
|
|
|
+ FOutput.Add('ifeq ($(OS_TARGET),'+TargetStr[t]+')');
|
|
|
for i:=0 to sl.count-1 do
|
|
|
begin
|
|
|
FOutput.Add(prefix+VarName(sl[i])+'=1');
|
|
@@ -641,8 +627,7 @@ implementation
|
|
|
AddStrNoDup(reqs,sl[i]);
|
|
|
end;
|
|
|
writeln;
|
|
|
-// if t<>t_all then
|
|
|
- FOutput.Add('endif');
|
|
|
+ FOutput.Add('endif');
|
|
|
end;
|
|
|
sl.Free;
|
|
|
end;
|
|
@@ -654,7 +639,6 @@ implementation
|
|
|
AddPackage(req,prefix);
|
|
|
until false;
|
|
|
WritePhony;
|
|
|
-// slall.Free;
|
|
|
end;
|
|
|
|
|
|
procedure TMakefileWriter.WriteGenericMakefile;
|
|
@@ -670,24 +654,24 @@ implementation
|
|
|
Add('#');
|
|
|
Add('# Don''t edit, this file is generated by '+TitleDate);
|
|
|
Add('#');
|
|
|
- if CheckVariable('default.rule') then
|
|
|
- Add('default: '+FInput.GetVariable('default.rule'))
|
|
|
+ if CheckVariable('default_rule') then
|
|
|
+ Add('default: '+FInput.GetVariable('default_rule'))
|
|
|
else
|
|
|
Add('default: all');
|
|
|
{ Add automatic detect sections }
|
|
|
AddIniSection('osdetect');
|
|
|
{ Forced target }
|
|
|
- if CheckVariable('default.target') then
|
|
|
- Add('override OS_TARGET='+FInput.GetVariable('default.target'));
|
|
|
- if CheckVariable('default.cpu') then
|
|
|
- Add('override CPU_TARGET='+FInput.GetVariable('default.cpu'));
|
|
|
+ if CheckVariable('default_target') then
|
|
|
+ Add('override OS_TARGET='+FInput.GetVariable('default_target'));
|
|
|
+ if CheckVariable('default_cpu') then
|
|
|
+ Add('override CPU_TARGET='+FInput.GetVariable('default_cpu'));
|
|
|
{ FPC Detection }
|
|
|
AddIniSection('fpcdetect');
|
|
|
AddIniSection('fpcdircheckenv');
|
|
|
- if CheckVariable('default.fpcdir') then
|
|
|
+ if CheckVariable('default_fpcdir') then
|
|
|
begin
|
|
|
Add('ifeq ($(FPCDIR),wrong)');
|
|
|
- Add('override FPCDIR='+FInput.GetVariable('default.fpcdir'));
|
|
|
+ Add('override FPCDIR='+FInput.GetVariable('default_fpcdir'));
|
|
|
Add('ifeq ($(wildcard $(FPCDIR)/rtl),)');
|
|
|
Add('ifeq ($(wildcard $(FPCDIR)/units),)');
|
|
|
Add('override FPCDIR=wrong');
|
|
@@ -697,8 +681,8 @@ implementation
|
|
|
end;
|
|
|
AddIniSection('fpcdirdetect');
|
|
|
{ Package }
|
|
|
- AddVariable('package.name');
|
|
|
- AddVariable('package.version');
|
|
|
+ AddVariable('package_name');
|
|
|
+ AddVariable('package_version');
|
|
|
{ First add the required packages sections }
|
|
|
// for i:=0 to FInput.RequireList.Count-1 do
|
|
|
// AddCustomSection(FInput.Requirelist[i]);
|
|
@@ -706,37 +690,37 @@ implementation
|
|
|
if assigned(FInput['prerules']) then
|
|
|
AddStrings(TFPCMakeSection(FInput['prerules']).List);
|
|
|
{ Default }
|
|
|
- AddVariable('default.dir');
|
|
|
+ AddVariable('default_dir');
|
|
|
{ Targets }
|
|
|
- AddTargetVariable('target.dirs');
|
|
|
- AddTargetVariable('target.programs');
|
|
|
- AddTargetVariable('target.units');
|
|
|
- AddTargetVariable('target.loaders');
|
|
|
- AddTargetVariable('target.rsts');
|
|
|
- AddTargetVariable('target.examples');
|
|
|
- AddTargetVariable('target.exampledirs');
|
|
|
+ AddTargetVariable('target_dirs');
|
|
|
+ AddTargetVariable('target_programs');
|
|
|
+ AddTargetVariable('target_units');
|
|
|
+ AddTargetVariable('target_loaders');
|
|
|
+ AddTargetVariable('target_rsts');
|
|
|
+ AddTargetVariable('target_examples');
|
|
|
+ AddTargetVariable('target_exampledirs');
|
|
|
{ Clean }
|
|
|
- AddTargetVariable('clean.units');
|
|
|
- AddTargetVariable('clean.files');
|
|
|
+ AddTargetVariable('clean_units');
|
|
|
+ AddTargetVariable('clean_files');
|
|
|
{ Install }
|
|
|
- AddTargetVariable('install.units');
|
|
|
- AddTargetVariable('install.files');
|
|
|
- AddVariable('install.prefixdir');
|
|
|
- AddVariable('install.basedir');
|
|
|
- AddVariable('install.datadir');
|
|
|
+ AddTargetVariable('install_units');
|
|
|
+ AddTargetVariable('install_files');
|
|
|
+ AddVariable('install_prefixdir');
|
|
|
+ AddVariable('install_basedir');
|
|
|
+ AddVariable('install_datadir');
|
|
|
{ Dist }
|
|
|
- AddVariable('dist.zipname');
|
|
|
- AddVariable('dist.ziptarget');
|
|
|
+ AddVariable('dist_zipname');
|
|
|
+ AddVariable('dist_ziptarget');
|
|
|
{ Compiler }
|
|
|
- AddTargetVariable('compiler.options');
|
|
|
- AddTargetVariable('compiler.version');
|
|
|
- AddTargetVariable('compiler.includedir');
|
|
|
- AddTargetVariable('compiler.unitdir');
|
|
|
- AddTargetVariable('compiler.sourcedir');
|
|
|
- AddTargetVariable('compiler.objectdir');
|
|
|
- AddTargetVariable('compiler.librarydir');
|
|
|
- AddTargetVariable('compiler.targetdir');
|
|
|
- AddTargetVariable('compiler.unittargetdir');
|
|
|
+ AddTargetVariable('compiler_options');
|
|
|
+ AddTargetVariable('compiler_version');
|
|
|
+ AddTargetVariable('compiler_includedir');
|
|
|
+ AddTargetVariable('compiler_unitdir');
|
|
|
+ AddTargetVariable('compiler_sourcedir');
|
|
|
+ AddTargetVariable('compiler_objectdir');
|
|
|
+ AddTargetVariable('compiler_librarydir');
|
|
|
+ AddTargetVariable('compiler_targetdir');
|
|
|
+ AddTargetVariable('compiler_unittargetdir');
|
|
|
{ default dirs/tools/extensions }
|
|
|
AddIniSection('shelltools');
|
|
|
AddIniSection('defaulttools');
|
|
@@ -752,19 +736,19 @@ implementation
|
|
|
AddIniSection('command_libc');
|
|
|
AddIniSection('command_end');
|
|
|
{ compile }
|
|
|
- if CheckTargetVariable('target.loaders') then
|
|
|
+ if CheckTargetVariable('target_loaders') then
|
|
|
AddIniSection('loaderrules');
|
|
|
- if CheckTargetVariable('target.units') then
|
|
|
+ if CheckTargetVariable('target_units') then
|
|
|
AddIniSection('unitrules');
|
|
|
- if CheckTargetVariable('target.programs') then
|
|
|
+ if CheckTargetVariable('target_programs') then
|
|
|
AddIniSection('exerules');
|
|
|
- if CheckTargetVariable('target.rsts') then
|
|
|
+ if CheckTargetVariable('target_rsts') then
|
|
|
AddIniSection('rstrules');
|
|
|
- if CheckTargetVariable('target.examples') or
|
|
|
- CheckTargetVariable('target.exampledirs') then
|
|
|
+ if CheckTargetVariable('target_examples') or
|
|
|
+ CheckTargetVariable('target_exampledirs') then
|
|
|
AddIniSection('examplerules');
|
|
|
AddIniSection('compilerules');
|
|
|
- if CheckVariable('lib.name') then
|
|
|
+ if CheckVariable('lib_name') then
|
|
|
AddIniSection('libraryrules');
|
|
|
{ install }
|
|
|
AddIniSection('installrules');
|
|
@@ -775,10 +759,10 @@ implementation
|
|
|
{ info }
|
|
|
AddIniSection('inforules');
|
|
|
{ Subdirs }
|
|
|
- AddTargetDirs('target.dirs');
|
|
|
- AddTargetDirs('target.exampledirs');
|
|
|
+ AddTargetDirs('target_dirs');
|
|
|
+ AddTargetDirs('target_exampledirs');
|
|
|
{ Tools }
|
|
|
- AddTools('require.tools');
|
|
|
+ AddTools('require_tools');
|
|
|
{ Rules }
|
|
|
AddRules;
|
|
|
{ Users own rules }
|
|
@@ -795,7 +779,10 @@ implementation
|
|
|
end.
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.3 2001-02-01 22:00:10 peter
|
|
|
+ Revision 1.4 2001-02-20 21:49:31 peter
|
|
|
+ * fixed change variable accessing using _ instead of .
|
|
|
+
|
|
|
+ Revision 1.3 2001/02/01 22:00:10 peter
|
|
|
* default.fpcdir is back
|
|
|
* subdir requirement checking works, but not very optimal yet as
|
|
|
it can load the same Makefile.fpc multiple times
|