diff options
author | Andras Timar <andras.timar@collabora.com> | 2016-10-12 14:11:40 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-10-12 14:11:40 +0200 |
commit | d0edb8833eae3f76869e8718c380e491f1d23419 (patch) | |
tree | cfc4b42ccf3931033a049af806842a23f08bc1d0 /helpers | |
parent | 988ace944d9ec4991d7aa5fe22455fe9024e9aaf (diff) |
remove old dmake related helper files
Change-Id: I71dc2ef7dfdbcfaf82e4ae3875fef7de62db0e64
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/createmakefile.pl | 452 | ||||
-rw-r--r-- | helpers/linkmakefile.template | 53 | ||||
-rw-r--r-- | helpers/makefile.template | 43 |
3 files changed, 0 insertions, 548 deletions
diff --git a/helpers/createmakefile.pl b/helpers/createmakefile.pl deleted file mode 100644 index e6bf34b228..0000000000 --- a/helpers/createmakefile.pl +++ /dev/null @@ -1,452 +0,0 @@ -#!/usr/bin/perl -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -use File::Find; -use File::Basename; - -# creates the help2 makefile for a given -# directory including all help xhp files -# in that and the subordinate directories -# Only help files with the following -# -# status values are included: -# PUBLISH DEPRECATED -# -# The following status values are -# disregarded: -# DRAFT FINAL STALLED - -$makefiletemplate = 'helpers/makefile.template'; -$linkmakefiletemplate = 'helpers/linkmakefile.template'; -$prj = "helpcontent2"; -$helpdirprefix = "$prj/source/"; - -undef @sbasic; -undef @scalc; -undef @schart; -undef @sdraw; -undef @shared; -undef @simpress; -undef @smath; -undef @swriter; - -$params = join "|", "",@ARGV,""; -($params =~ /-dir/) ? ($startdir = $params) =~ (s/.*-dir=([^\|]*).*$/$1/gs) : (($startdir = `pwd`) =~ s/\n//gs); -($startdir = $startdir."/source/text") if ($startdir =~ /$prj$/); -($params =~ /-linkdir/) ? ($linkdir = $params) =~ (s/.*-linkdir=([^\|]*).*$/$1/gs) : (($linkdir = `pwd`) =~ s/\n//gs); -($linkdir = $linkdir."/util") if ($linkdir =~ /$prj$/); -$recursive = $params =~ /-recursive/ || 0; -$all = $params =~ /-all/ || 0; - -if (open TMPL, $makefiletemplate) { - undef $/; - $tmpl = <TMPL>; - close TMPL; -} else { - &terminate("Cannot open $makefiletemplate"); -} - -if (open LINKTMPL, $linkmakefiletemplate) { - undef $/; - $linktmpl = <LINKTMPL>; - close LINKTMPL; -} else { - &terminate("Cannot open $linkmakefiletemplate"); -} - -print "Start Directory: $startdir\n"; -print "Link Directory : $linkdir\n"; -print "Recursive : ". ($recursive ? "yes" : "no") . "\n"; -print "All files : ". ($all ? "yes" : "no") . "\n"; - -if ($recursive) { - find(sub{push @dirs, $File::Find::name if (-d and ($File::Find::name!~/\/CVS/));},$startdir); -} else { - push @dirs, $startdir; -} - -#print join "\n", @dirs; -#die; - -for $d(@dirs) { - opendir DIR, $d; - @files = grep {/xhp$/} readdir DIR; - undef @files2; - closedir DIR; - - ($helpdir = $d) =~ s/.*\/$helpdirprefix/source\//gis; - - ($package = $helpdir) =~ s/^source\///gi; - - ($target = $package) =~ s/\//_/g; $target =~ s/_$//; - ($module = $package) =~ s/^\/*text\/([^\/]+)\/*.*$/$1/; - - for $f(@files) { - ($n,$p,$e) = fileparse($f,".xhp"); - if (not $all) { - if (open XML, $d.'/'.$f) { - undef $/; - ($status = <XML>) =~ s/.*<topic[^>]*status="([^"]*)"[^>]*>.*$/$1/gs; - close XML; - } else { - die "Error: Cannot open ${d}/$f:$!\n"; - } - if ($status =~ /(DEPRECATED|PUBLISH)/i) { - ($p2=$package) =~ s,/,\$/,gis; - push @{$module}, $p2.'$/'.$n.'.xhp'; - push @files2, ' '.$n.'.xhp '; - } - } else { - ($p2=$package) =~ s,/,\$/,gis; - push @{$module}, $p2.'$/'.$n.'.xhp'; - push @files2, ' '.$n.'.xhp '; - } - } - - printf "%s: %4d files, %4d included in makefile -> ",$d,scalar @files,scalar @files2; - - if (scalar @files2 > 0) { # don't write makefiles where there are no files to make - ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/' x ((split "/", $helpdir) -1); $prj = $prj . ".."; - - - $xhpfiles = join "\\\n", sort @files2; - - ($makefile = $tmpl) =~ s/%([^%]*)%/$$1/gise; - - if (open(MK, ">$d/makefile.mk")) { - print MK $makefile; - close MK; - print "makefile created\n"; - } else { - &terminate("Cannot write to ${d}/makefile.mk\n"); - } - } else { - print "NO makefile created\n"; - } -} - -@sbasic = sort @sbasic; -@schart = sort @schart; -@scalc = sort @scalc; -@shared = sort @shared; -@sdraw = sort @sdraw; -@simpress = sort @simpress; -@smath = sort @smath; -@swriter = sort @swriter; - -# now create the link makefiles - -#---------------------------------- -# sbasic - $module = "sbasic"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - for (@sbasic) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - - -#------------------------------------- -# scalc - $module = "scalc"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - for (@scalc) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@schart) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#-------------------------------- -# schart - $module = "schart"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@schart) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#------------------------------ -# sdraw - $module = "sdraw"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - for (@sdraw) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@simpress) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@schart) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#------------------------------------- -# shared - - $module = "shared"; - - $linkaddedfiles = <<"LAF"; - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip \\ - -add default.css \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/default.css \\ - -add highcontrast1.css \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrast1.css \\ - -add highcontrast2.css \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrast2.css \\ - -add highcontrastwhite.css \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrastwhite.css \\ - -add highcontrastblack.css \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrastblack.css \\ - -add err.html \$(COMMONMISC)\$/LANGUAGE\$/text\$/shared\$/05\$/err_html.xhp -LAF - - $linkaddeddeps = <<"LAD"; - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip \\ - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/default.css \\ - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrast1.css \\ - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrast2.css \\ - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrastwhite.css \\ - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/highcontrastblack.css \\ - \$(COMMONMISC)\$/LANGUAGE\$/text\$/shared\$/05\$/err_html.xhp -LAD - - $linklinkfiles = ''; - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#------------------------------- -# simpress - $module = "simpress"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - - for (@sdraw) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@simpress) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@schart) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#------------------------------------- -# smath - $module = "smath"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - for (@smath) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#------------------------------- -# swriter - $module = "swriter"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.tree \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONMISC)\$/LANGUAGE\$/$module.tree \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - for (@swriter) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - for (@schart) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - &writelinkmakefile($module,$linkmakefile); - -#------------------------------- -# sdatabase - $module = "sdatabase"; - - $linkaddedfiles = <<"LAF"; - -add $module.cfg \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - -add $module.jar \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAF - - $linkaddeddeps = <<"LAD"; - \$(PRJ)\$/source\$/auxiliary\$/LANGUAGE\$/$module.cfg \\ - \$(COMMONBIN)\$/xhp_${module}_LANGUAGE.zip -LAD - - $linklinkfiles = ''; - for (@shared) { $linklinkfiles = $linklinkfiles . " $_ \\\n"; } - $auth = "script"; - $date = sprintf "%4d/%02d/%02d %02d:%02d:%02d",$year+1900,$mon,$mday,$hour,$min,$sec; - $prj = '..$/..' ; - - ($linkmakefile = $linktmpl) =~ s/%([^%]*)%/$$1/gise; - - # remove zip1 targets - $linkmakefile =~ s,\n(ZIP1LIST=.*)\n,\nZIP1LIST=\$(LANGDIR)\$/text\$/shared\$/explorer\$/database\$/main.xhp\n,gi; - &writelinkmakefile($module,$linkmakefile); - - - -print "sbasic: $#sbasic\n"; -print "scalc : $#scalc\n"; -print "schart: $#schart\n"; -print "sdraw : $#sdraw\n"; -print "shared: $#shared\n"; -print "simpr : $#simpress\n"; -print "smath : $#smath\n"; -print "swrit : $#swriter\n"; -print "sdbase: $#sdatabase\n"; - -sub terminate { - $err = shift; - print "$err\n\n"; - $msg = <<"MSG"; -createmakefile.pl -dir=[directory name] -linkdir=[directory name] [-recursive] [-all] - -dir Directory to start - -linkdir Directory to write the link makefiles - -recursive Write makefiles recursively - -all include files with all status values -MSG - die "$msg\n"; -} - - -sub writelinkmakefile { - $module = shift; - $content = shift; - if (open(MK, ">$linkdir/$module/makefile.mk")) { - print MK $content; - close MK; - } else { - &terminate("Cannot write makefile to ${linkdir}/$module\n"); - } -} diff --git a/helpers/linkmakefile.template b/helpers/linkmakefile.template deleted file mode 100644 index c9226de7e2..0000000000 --- a/helpers/linkmakefile.template +++ /dev/null @@ -1,53 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -# edit to match directory level -PRJ = %prj% -# same for all makefiles in "helpcontent2" -PRJNAME = helpcontent2 -# uniqe name (module wide); -# using a modified form of package should do here -TARGET = util_%module% - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/settings.pmk - -#common_build_zip:= -zip1generatedlangs=TRUE -zip1langdirs=$(aux_alllangiso) -ZIP1TARGET=xhp_%module% -ZIP1FLAGS= -u -r -ZIP1DIR=$(COMMONMISC)$/$(LANGDIR) -ZIP1LIST=$(LANGDIR)$/text$/%module%$/* -x "*.xhp????*" -x "*.dphh*" -x "*.hzip" -x "*.created" - -LINKNAME=%module% -LINKADDEDFILES= \ -%linkaddedfiles% - -LINKADDEDDEPS= \ -%linkaddeddeps% - -LINKLINKFILES= \ -%linklinkfiles% - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : $(PRJ)$/util$/target.pmk diff --git a/helpers/makefile.template b/helpers/makefile.template deleted file mode 100644 index 946e8fb0d8..0000000000 --- a/helpers/makefile.template +++ /dev/null @@ -1,43 +0,0 @@ -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -# edit to match directory level -PRJ = %prj% -# same for all makefiles in "helpcontent2" -PRJNAME = helpcontent2 -# edit to match the current package -PACKAGE = %package% -# uniqe name (module wide); -# using a modified form of package should do here -TARGET = %target% -# edit to match the current module -MODULE = %module% - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/settings.pmk - -# this list matches the *.xhp files to process -XHPFILES = \ -%xhpfiles% - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : tg_help.mk |