mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
35 lines
719 B
Tcsh
Executable File
35 lines
719 B
Tcsh
Executable File
#!/bin/csh
|
|
# makemake: Dumb script to make Makefile from Makefile.in
|
|
# (recursively, if -r is specified)
|
|
# Usage: makemake [-r]
|
|
|
|
if ($#argv == 0) then
|
|
set makelist = (./Makefile.in)
|
|
else
|
|
set makelist = (`find . -name Makefile.in -print`)
|
|
endif
|
|
|
|
foreach makefile ($makelist)
|
|
set dir=${makefile:h}
|
|
pushd $dir
|
|
|
|
set wd=`pwd`
|
|
echo $wd
|
|
|
|
set top_srcdir = ""
|
|
while (${wd:t} != "mozilla")
|
|
if ("$top_srcdir" == "") then
|
|
set top_srcdir = ".."
|
|
else
|
|
set top_srcdir = "../$top_srcdir"
|
|
endif
|
|
set wd=${wd:h}
|
|
end
|
|
|
|
/bin/cp Makefile.in Makefile
|
|
globsub @srcdir@ @srcdir@ . Makefile
|
|
globsub @top_srcdir@ @top_srcdir@ $top_srcdir Makefile
|
|
|
|
popd
|
|
end
|