bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#118908: make TAGS does not work without having run configure


From: Neal H Walfield
Subject: Bug#118908: make TAGS does not work without having run configure
Date: Thu, 15 Nov 2001 00:47:17 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1

> None of those problems are fixed by giving TAGS no dependencies.
> If you have a suggestion, make it.

These patches make two changes: the primary makefile will continue
even if `Makeconf' does not exist; we should not generate the TAGS
file based on the named objects, i.e. $(OBJS), but, rather, based on
the source files, i.e. $(SRCS).  Honestly, I see no real reason to
care about the code that MiG generates -- if it is that important, it
is possible to add it to the OTHERTAGS variable.  Even better, etags
could be extended to understand MiG defs files.  In fact, this would
not be too problematic using the MIGCOMSFLAGS to get the server
prefix, etc.

These changes are not, however, prefect.  The problem that I am trying
to figure out is how to set variables based on targets (which, as far
as I can tell, is not possible): the dependency files are still built
in the directory in which I start the build unless I explicitly give
`no_deps=t' on the command line.  This is what I am talking about:

neal@desdemona:~/src/hurd (0)$ make TAGS
make -C debian directory-depend no_deps=t
make[1]: Entering directory `/home/neal/src/hurd/debian'
rm -f ../debian.d
echo debian:   > ../debian.d
make[1]: Leaving directory `/home/neal/src/hurd/debian'
make -C include directory-depend no_deps=t
make[1]: Entering directory `/home/neal/src/hurd/include'
rm -f ../include.d
echo include:   > ../include.d

 . . .

make -C proc TAGS no_deps=t
make[1]: Entering directory `/home/neal/src/hurd/proc'
etags -o TAGS wait.c hash.c host.c info.c main.c mgt.c notify.c pgrp.c msg.c 
cpu-types.c stubs.c
make[1]: Leaving directory `/home/neal/src/hurd/proc'
make -C exec TAGS no_deps=t
make[1]: Entering directory `/home/neal/src/hurd/exec'
etags -o TAGS exec.c main.c hashexec.c hostarch.c unzip.c util.c inflate.c
make[1]: Leaving directory `/home/neal/src/hurd/exec'

 . . .


The same basic thing happens with `make clean'.  However, this is even
more annoying as I usually only run `make clean' in a single, child,
directory.

Anyway, ideas are welcome.



2001-11-13  Neal H Walfield  <neal@cs.uml.edu>

        * Makefile: Do not fail when trying to include Makeconf if it
        is not found.
        * Makeconf (TAGS): Build the TAGS file based on the contents
        of $(SRCS), not $(OBJS).
        (DEP_SRCS): Removed.


Index: Makefile
===================================================================
RCS file: /cvsroot/hurd/hurd/Makefile,v
retrieving revision 1.119
diff -u -r1.119 Makefile
--- Makefile    2001/02/11 00:23:04     1.119
+++ Makefile    2001/11/14 23:19:54
@@ -18,7 +18,7 @@
 dir := .
 makemode := misc
 
-include ./Makeconf
+-include ./Makeconf
 
 DIST_FILES = COPYING Makeconf config.make.in configure.in configure \
             move-if-change hurd.boot build.mk.in build.mkcf.in aclocal.m4 \
Index: Makeconf
===================================================================
RCS file: /cvsroot/hurd/hurd/Makeconf,v
retrieving revision 1.193
diff -u -r1.193 Makeconf
--- Makeconf    2001/08/25 01:40:34     1.193
+++ Makeconf    2001/11/14 23:19:54
@@ -370,9 +370,7 @@
 
 # TAGS files
 ifneq ($(dir),.)
-DEP_SRCS = sed -e 's/^.*://' -e 's/ \\$$//' | tr ' ' '\012'| \
-          sed -n -e 's@^$(srcdir)@&@p' -e 's@^[^/]@&@p' | sort -ur
-ifeq ($(OBJS),)
+ifeq ($(SRCS),)
 TAGS: $(OTHERTAGS)
 ifeq ($(OTHERTAGS),)
 # no tags, but parent will include this file, so make empty one.
@@ -381,8 +379,8 @@
        etags -o $@ $^
 endif
 else
-TAGS: $(OBJS:.o=.d) $(OTHERTAGS)
-       cat $(OBJS:.o=.d) | $(DEP_SRCS) | etags -o $@ - $(OTHERTAGS)
+TAGS: $(SRCS) $(OTHERTAGS)
+       etags -o $@ $^
 endif
 endif
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]