PATCH: vpath/source generation weirdness in mc/gnome/Makefile.in



I couldn't build mc with builddir /= srcdir because
GNU make when trying to build gcorba.o:

1. found out that gcorba.c was in $(srcdir) through VPATH
2. so it didn't need to build gcorba.c
3. but issued a compile command on gcorba.c instead of $(srcdir)/gcorba.c
   leading to gcorba.c not found from the compiler if builddir /= srcdir

Here is a small patch that fixes this behaviour while keeping
dependancy on CORBA-to-be-generated sources (worked for me at least).

--LG

Index: gnome/Makefile.in
===================================================================
RCS file: /cvs/gnome/mc/gnome/Makefile.in,v
retrieving revision 1.99
diff -u -r1.99 Makefile.in
--- Makefile.in	1999/02/19 00:18:27	1.99
+++ Makefile.in	1999/02/25 00:01:48
@@ -170,14 +170,9 @@
 	FileManager-skels.c	\
 	FileManager-common.c
 
-CORBA_SOURCES = 		\
-	gcorba.c
-
 $(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
 	orbit-idl `gnome-config --cflags idl` $(rootdir)/idl/FileManager.idl
 
-$(CORBA_SOURCES): $(CORBA_GENERATED)
-
 FileManager-impl.c: FileManager.h
 
 EXTRA_DIST = gnome.TODO layout gmc.gnorba mc.keys.in.in	gimp.image.desktop 
@@ -194,6 +189,8 @@
 
 main-corba.o: main.c
 	$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o main-corba.o
+
+gcorba.o: gcorba.c $(CORBA_GENERATED)
 
 all: @mx@ Makefile mc.keys 
 



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