* Make.common.in: Remove obsolete dependency tracking system.

* configure.in: Likewise.
* edit/Makefile.in: Likewise.
* gnome/Makefile.in: Likewise.
* gtkedit/Makefile.in: Likewise.
* slang/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* vfs/Make-mc.in: Likewise.
* src/depend.awk: Remove.
This commit is contained in:
Pavel Roskin 2001-05-27 04:34:12 +00:00
parent 59d332e0d9
commit b0593ec1e2
10 changed files with 21 additions and 275 deletions

View File

@ -1,3 +1,15 @@
2001-05-27 Pavel Roskin <proski@gnu.org>
* Make.common.in: Remove obsolete dependency tracking system.
* configure.in: Likewise.
* edit/Makefile.in: Likewise.
* gnome/Makefile.in: Likewise.
* gtkedit/Makefile.in: Likewise.
* slang/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* vfs/Make-mc.in: Likewise.
* src/depend.awk: Remove.
2001-05-26 Pavel Roskin <proski@gnu.org>
* gtkedit/syntax.c (syntax_text): Add support for Octave files.

View File

@ -51,7 +51,6 @@ MV = mv
CP = cp
LN_S = @LN_S@
AWK = @AWK@
AWK_VAR_OPTION = @AWK_VAR_OPTION@
# Flags & libs
# No way, to make make happy (except GNU), we cannot use := to append
@ -83,8 +82,7 @@ hpath = -I$(mcsrcdir) -I$(slangdir) -I$(vfsdir)
# Rules
first_rule: all
@PHONY@ all check cross TAGS clean install uninstall distcopy depend dep
@PHONY@ fastdep fastdepslang fastdepvfs fastdeploc slowdep
.PHONY: all check cross TAGS clean install uninstall distcopy depend
@PCENTRULE@../slang/%.o : ../slang/%.c
@PCENTRULE@ cd ../slang; $(MAKE) libmcslang.a
@ -92,24 +90,6 @@ first_rule: all
@PCENTRULE@../vfs/%.o : ../vfs/%.c
@PCENTRULE@ cd ../vfs; $(MAKE) libvfs.a
fastdep: dummy
if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then { cd $(srcdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(srcdir)" *.[ch];} > .depend; fi
-$(MAKE) fastdeploc
@WRITEDEP@
fastdepslang:
@PCENTRULE@ { { { cd ../slang; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(slangdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../slang libmcslang.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(slangdir)";};} >> .depend
fastdepvfs:
@PCENTRULE@ { { { cd ../vfs; $(MAKE) showlibdep;} | grep OBJS; cat .depend;} | { cd $(vfsdir); $(AWK) -f $(mcsrcdir)/depend.awk $(AWK_VAR_OPTION) dolib="../vfs libvfs.a" $(AWK_VAR_OPTION) hpath="$(hpath)" $(AWK_VAR_OPTION) srcdir="$(vfsdir)";};} >> .depend
slowdep: dummy
if test x"`echo $(srcdir)/*.[ch]`" != x'$(srcdir)/*.[ch]'; then \
$(CPP) -M $(CPPFLAGS) $(DEFS) $(CFLAGS) $(srcdir)/*.c > .depend; fi
@WRITEDEP@
mcdep: @dep@
dummy:
# Added for compatability with Automake

View File

@ -15,22 +15,6 @@ AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_AWK
if test x"$AWK" = x; then
AWK=":"
AWK_VAR_OPTION=""
dep=slowdep
else
dep=fastdep
# test whether awk needs -v for variables (e.g. Solaris) or not (e.g. SunOs 4)
if test x"`echo | $AWK 'BEGIN { print variable; exit }' variable=123`" = x123; then
AWK_VAR_OPTION=""
else
AWK_VAR_OPTION="-v"
fi
fi
AC_SUBST(AWK_VAR_OPTION)
AC_SUBST(dep)
AC_PROG_GNU_MAKE
AC_AIX
@ -303,20 +287,17 @@ AC_SUBST(NETFILES)
LIBVFS=""
LVFS=""
fastdepvfs=""
vfs_type="normal"
if test $use_vfs = yes
then
LIBVFS="libvfs-mc.a"
LVFS="-lvfs-mc"
fastdepvfs=fastdepvfs
MCCPPFLAGS="$MCCPPFLAGS -I\$(vfsdir)"
AC_MSG_RESULT([Using the VFS switch code])
vfs_type="Midnight Commander Virtual File System"
fi
AC_SUBST(LIBVFS)
AC_SUBST(LVFS)
AC_SUBST(fastdepvfs)
screen_manager=unknown
search_ncurses=false
@ -422,13 +403,11 @@ dnl
dnl Check for Gnome
dnl
mx=""
gmcdep=""
libgtkedit=""
xvers="none"
GNOME_INIT_HOOK([
mx=mx
gmcdep=gmcdep
libgtkedit="libgtkedit.a"
if test x"$xvers" = xnone; then
xvers="Gnome"
@ -451,7 +430,6 @@ dnl Check for new enough gnome-libs
])
AC_SUBST(gnomeicondir)
AC_SUBST(mx)
AC_SUBST(gmcdep)
AC_SUBST(libgtkedit)
AC_SUBST(GNOMEGNORBA_LIBS)
AM_CONDITIONAL(GNOME, [test x"$mx" = xmx])
@ -715,7 +693,6 @@ AC_ARG_WITH(included-slang,
LIBSLANG=""
LSLANG=""
fastdepslang=""
AC_ARG_WITH(slang,
[--with-slang Compile with the slang screen manager],[
if test x$withval = xyes; then
@ -725,7 +702,6 @@ AC_ARG_WITH(slang,
AC_SUBST(LIBSLANG)
AC_SUBST(LSLANG)
AC_SUBST(fastdepslang)
LIBEDIT_A=""
MCEDIT=""
@ -937,18 +913,8 @@ AC_SUBST(LIBS)
ac_cv_make_with_percent_rules=no
if test x$ac_cv_prog_gnu_make = xyes; then
PHONY='.PHONY:'
DOTDEPEND='-include .depend'
WRITEDEP=":"
ac_cv_make_with_percent_rules=yes
else
PHONY='#'
DOTDEPEND=""
WRITEDEP='sed "/^. \*\*\*Dependencies\*\*\*/,/^. \*\*\*End of dependencies\*\*\*/d" < Makefile > Makefile.conf; { cat Makefile.conf; echo "# ***Dependencies***Do not edit***"; cat .depend; echo "# ***End of dependencies***" } > Makefile; $(RMF) Makefile.conf .depend'
fi
AC_SUBST(PHONY)
AC_SUBST(WRITEDEP)
AC_SUBST(DOTDEPEND)
MCF=./Make.common
AC_SUBST_FILE(MCF)

View File

@ -56,9 +56,6 @@ mcedit:
rm -f $(DESTDIR)$(bindir)/$(binprefix)mcedit
$(LN_S) mc $(DESTDIR)$(bindir)/$(binprefix)mcedit
showlibdep:
@echo 'OBJS="$(EDITOBJS)"'
TAGS: $(EDITSRC)
etags $(EDITSRC)
@ -70,7 +67,6 @@ clean: mostlyclean
distclean: clean
rm -f $(EDITLINKS)
rm -f .depend
rm -f TAGS
rm -f *~
rm -f Makefile
@ -86,10 +82,5 @@ distdir:
do cp -p $(srcdir)/$$I $(distdir) || exit 1; \
done
depend dep: mcdep
depend:
fastdeploc:
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

View File

@ -289,7 +289,6 @@ clean: mostlyclean
$(CORBA_GENERATED) $(MAGICDEV_GENERATED)
distclean: clean cleansourcelinks
rm -f .depend
rm -f TAGS
rm -f *~
rm -f Makefile
@ -335,12 +334,5 @@ uninstall:
rm -f $(DESTDIR)$(corbadir)/gmc.gnorba
-rmdir $(DESTDIR)$(corbadir)
depend dep: @gmcdep@
depend:
gmcdep: checklinks mcdep
fastdeploc: @fastdepslang@ @fastdepvfs@
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

View File

@ -50,9 +50,6 @@ mcedit:
rm -f $(DESTDIR)$(bindir)/$(binprefix)mcedit
$(LN_S) mc $(DESTDIR)$(bindir)/$(binprefix)mcedit
showlibdep:
@echo 'OBJS="$(EDITOBJS)"'
TAGS: $(EDITSRC)
etags $(EDITSRC)
@ -63,7 +60,6 @@ clean: mostlyclean
rm -f libgtkedit.a
distclean: clean
rm -f .depend
rm -f TAGS
rm -f *~
rm -f Makefile
@ -79,10 +75,5 @@ distdir:
do cp -p $(srcdir)/$$I $(distdir) || exit 1; \
done
depend dep: mcdep
depend:
fastdeploc:
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

View File

@ -45,9 +45,6 @@ libmcslang.a: $(SLANGOBJS)
$(AR) cr $@ $(SLANGOBJS)
-$(RANLIB) $@
showlibdep:
@echo 'OBJS="$(SLANGOBJS)"'
TAGS: $(SLANGSRCS)
etags $(SLANGSRCS)
@ -58,7 +55,7 @@ clean: mostlyclean
rm -f libmcslang.a
distclean: clean
rm -f .depend slang.h
rm -f slang.h
rm -f TAGS
rm -f *~
rm -f Makefile
@ -72,10 +69,5 @@ distdir:
install uninstall:
depend dep: mcdep
depend:
fastdeploc:
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

View File

@ -59,7 +59,7 @@ OBJS = dir.o util.o screen.o dialog.o key.o keyxdef.o menu.o \
DISTFILES = \
$(HDRS) $(SRCS) Makefile.in TODO ChangeLog OChangeLog man2hlp.c \
gindex.pl cons.saver.c ncurses.patch mc.hlp depend.awk mfmt.c
gindex.pl cons.saver.c ncurses.patch mc.hlp mfmt.c
all: mc mcmfmt $(srcdir)/mc.hlp @cons_saver@ Makefile
@ -107,7 +107,6 @@ clean: mostlyclean
rm -f mc cons.saver man2hlp mc.html mcmfmt
distclean: clean
rm -f .depend
rm -f TAGS
rm -f *~
rm -f Makefile
@ -156,10 +155,5 @@ distdir: $(srcdir)/mc.hlp
do cp -p $(srcdir)/$$I $(distdir) || exit 1; \
done
depend dep: mcdep
depend:
fastdeploc: @fastdepslang@ @fastdepvfs@
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***

View File

@ -1,163 +0,0 @@
#! /usr/bin/awk -f
# This is an awk script which does dependencies. We do NOT want it to
# recursively follow #include directives.
# We only add to dependencies those files which are inside of the rootdir
# tree :)
#
# Surely there is a more elegant way to see if a file exists. Anyone know
# what it is?
#
function fileExists(f, TMP, dummy, result) {
if(result=FILEHASH[f]) {
if(result=="Yes") {
return "Yes"
} else {return ""}
}
ERRNO = getline dummy < f
if(ERRNO >= 0) {
close(f)
return FILEHASH[f]="Yes"
} else {
FILEHASH[f]="No"
return ""
}
}
function Canonic(path) {
while (path ~ "/[^/]*/\\.\\./")
gsub("/[^/]*/\\.\\./","/",path)
return path
}
BEGIN{
hasdep=0
objprefix=""
USEDC=0
if(dolib) {
# dolib = "libdirectory libname"
split(dolib, dlib)
I=0
rootdir=srcdir
sub("/$","",rootdir)
sub("/[^/]*$","",rootdir)
while (getline > 0) {
if ($0 ~ "OBJS") {
objs=$0
} else if ($0 ~ "^/.*\\.h: \\\\$") {
sub(": \\\\$","",$0)
USED[USEDC]=$0
++USEDC
}
}
sub("^OBJS=[ ]*\"[ ]*","",objs)
sub("\"[ ]*","",objs)
split(objs, obj)
printf "%s: ", dlib[2]
sub("/$","", dlib[1])
objprefix=dlib[1]"/"
for (fname in obj) {
fullname=dlib[1]"/"obj[fname]
printf " \\\n %s", fullname
sub("\\.o$",".c",obj[fname])
ARGV[ARGC]=obj[fname]
++ARGC
}
printf "\n"
}
if(!hpath) {
print "hpath is not set"
exit 1
}
if(!srcdir) {
print "srcdir is not set"
exit 1
}
sub("[/ ]*$","",srcdir)
srcdir=srcdir"/"
sub("^\./$","",srcdir)
split(hpath, parray)
for(path in parray) {
sub("^-I","",parray[path])
sub("[/ ]*$","",parray[path])
parray[path]=Canonic(parray[path])
}
for(path in ARGV) {
USED[USEDC]=Canonic(srcdir""ARGV[path])
++USEDC
}
}
/^#[ ]*include[ ]*[<"][^ ]*[>"]/{
found=0
if(LASTFILE!=FILENAME) {
if (hasdep) {
print cmd
hasdep=0
}
cmd=""
LASTFILE=FILENAME
depname=FILENAME
relpath=FILENAME
sub("\\.c$",".o: ",depname)
if (depname==FILENAME) {
depname=srcdir""depname
depname=Canonic(depname)
cmd="\n\t@touch "depname
} else
depname=objprefix""depname
sub("\\.h$",".h: ",depname)
if(relpath ~ "^\\." ) {
sub("[^/]*$","", relpath)
relpath=relpath"/"
sub("//","/", relpath)
} else {
relpath=""
}
}
fname=$0
sub("^#[ ]*include[ ]*[<\"]","",fname)
sub("[>\"].*","",fname)
if(fileExists(relpath""fname)) {
found=1
if (!hasdep) {
printf "%s", depname
hasdep=1
}
fullname=Canonic(srcdir""relpath""fname)
printf " \\\n %s", fullname
if(fname ~ "^\\." ) {
partname=relpath""fname
afound=0
for(name in USED) {
if (USED[name] == fullname) {
afound=1
break
}
}
if (!afound) {
ARGV[ARGC]=partname
++ARGC
USED[USEDC]=fullname
++USEDC
}
}
} else {
for(path in parray) {
if(fileExists(parray[path]"/"fname)) {
found=1
if (!hasdep) {
printf "%s", depname
hasdep=1
}
printf " \\\n %s", parray[path]"/"fname
}
}
}
}
END{
if (hasdep) {
print cmd
}
}

View File

@ -209,9 +209,6 @@ libvfs.so: $(VFSSOOBJS)
samba/libsamba.a:
cd samba && $(MAKE) libsamba.a
showlibdep:
@echo 'OBJS="$(VFSOBJS)"'
TAGS: $(VFSSRCS)
etags $(VFSSRCS)
@ -235,7 +232,6 @@ distclean: clean
(cd samba && $(MAKE) distclean); \
else :; fi
rm -f $(SRC_LINKS)
rm -f .depend
rm -f TAGS
rm -f *~
rm -f Makefile
@ -272,10 +268,5 @@ distdir:
cp -p $(srcdir)/samba/$$I $(distdir)/samba/$$I \
|| exit 1; done
depend dep: mcdep
depend:
fastdeploc:
# ***Dependencies***Do not edit***
@DOTDEPEND@
# ***End of dependencies***