Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
82cdcc2b
Kaydet (Commit)
82cdcc2b
authored
Eki 12, 2010
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cleanup macro.pl - re-build if your config changes
üst
6ef9e5bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
24 deletions
+30
-24
macro.pl
scp2/macros/macro.pl
+29
-22
makefile.mk
scp2/macros/makefile.mk
+1
-2
No files found.
scp2/macros/macro.pl
Dosyayı görüntüle @
82cdcc2b
...
@@ -25,9 +25,11 @@
...
@@ -25,9 +25,11 @@
#
#
#*************************************************************************
#*************************************************************************
my
$outfile
;
my
$destfile
;
my
$config_stamp
;
my
$lastcompletelangiso_var
;
my
$completelangiso_var
=
$ENV
{
COMPLETELANGISO_VAR
};
my
$completelangiso_var
=
$ENV
{
COMPLETELANGISO_VAR
};
my
$lastcompletelangiso_var
;;
my
$outfile
=
""
;
if
(
!
defined
$completelangiso_var
)
{
if
(
!
defined
$completelangiso_var
)
{
print
STDERR
"ERROR: No language defined!\n"
;
print
STDERR
"ERROR: No language defined!\n"
;
...
@@ -42,11 +44,11 @@ foreach $lang (split (/ /, $poorhelplocalizations_var)) {
...
@@ -42,11 +44,11 @@ foreach $lang (split (/ /, $poorhelplocalizations_var)) {
$poorhelplocalizations
{
$lang
}
++
;
$poorhelplocalizations
{
$lang
}
++
;
}
}
startup_check
();
if
(
!
args_require_build
())
{
if
(
"$completelangiso_var"
eq
"$lastcompletelangiso_var"
)
{
print
STDERR
"No new languages, or config. Keeping old file\n"
;
print
STDERR
"No new languages. Keeping old file\n"
;
exit
0
;
exit
0
;
}
}
print
STDERR
"re-building macros\n"
;
my
@completelangiso
=
split
" +"
,
$completelangiso_var
;
my
@completelangiso
=
split
" +"
,
$completelangiso_var
;
...
@@ -75,6 +77,7 @@ write_FILE_ALL_LANG_LETTER();
...
@@ -75,6 +77,7 @@ write_FILE_ALL_LANG_LETTER();
close
OUTFILE
;
close
OUTFILE
;
rename
$outfile
,
$destfile
;
sub
write_ALL_LANG
sub
write_ALL_LANG
{
{
...
@@ -256,25 +259,26 @@ sub write_FILE_ALL_LANG_LETTER
...
@@ -256,25 +259,26 @@ sub write_FILE_ALL_LANG_LETTER
print
OUTFILE
"\n\n"
;
print
OUTFILE
"\n\n"
;
}
}
sub
startup_check
sub
args_require_build
{
{
my
$i
;
while
(
@ARGV
)
{
for
(
$i
=
0
;
$i
<=
$#ARGV
;
$i
++
)
{
$opt
=
shift
@ARGV
;
if
(
"$ARGV[$i]"
eq
"-o"
)
{
$destfile
=
shift
@ARGV
if
(
$opt
eq
'-o'
);
if
(
defined
$ARGV
[
$i
+
1
]
)
{
$config_stamp
=
shift
@ARGV
if
(
$opt
eq
'-c'
);
$outfile
=
$ARGV
[
$i
+
1
];
}
else
{
usage
();
}
}
}
}
usage
()
if
$i
<
2
;
usage
()
if
(
!
defined
(
$destfile
)
||
!
defined
(
$config_stamp
));
usage
()
if
"$outfile"
eq
""
;
$outfile
=
"$destfile.tmp"
;
if
(
-
f
"$outfile"
)
{
# changed script - run allways
if
(
-
f
"$destfile"
)
{
return
if
(
stat
(
$0
))[
9
]
>
(
stat
(
"$outfile"
))[
9
]
;
# changed script - run always
return
1
if
(
stat
(
$0
))[
9
]
>
(
stat
(
"$destfile"
))[
9
]
;
open
OLDFILE
,
"$outfile"
or
die
"$0 - ERROR: $outfile exists but isn't readable.\n"
;
# changed set_soenv.stamp - run always
if
(
-
f
"$config_stamp"
)
{
return
1
if
(
stat
(
$config_stamp
))[
9
]
>
(
stat
(
$destfile
))[
9
];
}
open
OLDFILE
,
"$destfile"
or
die
"$0 - ERROR: $outfile exists but isn't readable.\n"
;
while
(
$line
=
<
OLDFILE
>
)
{
while
(
$line
=
<
OLDFILE
>
)
{
if
(
$line
=~
/^\/\/.*completelangiso:/
)
{
if
(
$line
=~
/^\/\/.*completelangiso:/
)
{
$lastcompletelangiso_var
=
$line
;
$lastcompletelangiso_var
=
$line
;
...
@@ -285,12 +289,15 @@ sub startup_check
...
@@ -285,12 +289,15 @@ sub startup_check
}
}
close
OLDFILE
;
close
OLDFILE
;
return
0
if
(
"$completelangiso_var"
eq
"$lastcompletelangiso_var"
);
}
}
return
1
;
}
}
sub
usage
sub
usage
{
{
print
STDERR
"Generate language dependend macros use in *.scp files\n"
;
print
STDERR
"Generate language dependend macros use in *.scp files\n"
;
print
STDERR
"perl $0 -o
outputfile
\n"
;
print
STDERR
"perl $0 -o
<outputfile> -c <config_stamp_file>
\n"
;
exit
1
;
exit
1
;
}
}
scp2/macros/makefile.mk
Dosyayı görüntüle @
82cdcc2b
...
@@ -45,5 +45,4 @@ ALLTAR : $(INCCOM)$/langmacros.inc
...
@@ -45,5 +45,4 @@ ALLTAR : $(INCCOM)$/langmacros.inc
.PHONY $(INCCOM)$/langmacros.inc
:
.PHONY $(INCCOM)$/langmacros.inc
:
@echo
------------------------------
@echo
------------------------------
@echo Making
:
$@
@echo Making
:
$@
@@-$(RENAME)
$@
$@.tmp
$(COMMAND_ECHO)$(PERL)
macro.pl
$(VERBOSITY)
-o
$@
-c
$(SOLARSRC)/set_soenv.stamp
$(COMMAND_ECHO)$(PERL) macro.pl $(VERBOSITY) -o $@.tmp && $(RENAME
:
s/+//) $@.tmp $@
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment