[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
target-specific rules and solaris make?
From: |
Assar Westerlund |
Subject: |
target-specific rules and solaris make? |
Date: |
03 Sep 2001 00:10:41 +0200 |
User-agent: |
Gnus/5.070098 (Pterodactyl Gnus v0.98) Emacs/20.6 |
Hi, I found the following issue when trying to use target-specific
rules with gnu make. My patch seems to fix the problem for me, but I
would like somebody to tell me if this is reasonable, and if it can be
fixed, or if I should rather send this to -bugs or add a bug in gnats
(gnats haven't been friendly to me the last few times I've tried to
use it).
The problem is that automake will generate rules such as this:
foo_test-foo-test.$(OBJEXT): foo-test.c
$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(foo_test_CFLAGS)
$(CFLAGS) -c -o foo_test-foo-test.$(OBJEXT) `test -f foo-test.c || echo
'$(srcdir)/'`foo-test.c
and since there's a foo-test.c file in the source directory, solaris
make will expand all mentions of this in the command to
$(srcdir)/foo-test.c, so the test-thing fails completely. I
`fixed' this by using ./ as a prefix.
Any comments?
/assar
Index: depend2.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/depend2.am,v
retrieving revision 1.39
diff -u -w -u -w -r1.39 depend2.am
--- depend2.am 2001/05/14 09:39:24 1.39
+++ depend2.am 2001/09/02 22:10:32
@@ -37,8 +37,8 @@
depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo'
@AMDEPBACKSLASH@
$(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
-?-o? %COMPILE% %-c% %-o% %OBJ% `test -f %SOURCE% || echo
'$(srcdir)/'`%SOURCE%
-?!-o? %COMPILE% %-c% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE%
+?-o? %COMPILE% %-c% %-o% %OBJ% `test -f ./%SOURCE% || echo
'$(srcdir)/'`%SOURCE%
+?!-o? %COMPILE% %-c% `test -f ./%SOURCE% || echo '$(srcdir)/'`%SOURCE%
?GENERIC?.%EXT%.obj:
?!GENERIC?%OBJOBJ%: %SOURCE%
@@ -59,5 +59,5 @@
$(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
## We can always use `-o' with Libtool.
- %LTCOMPILE% %-c% -o %LTOBJ% `test -f %SOURCE% || echo
'$(srcdir)/'`%SOURCE%
+ %LTCOMPILE% %-c% -o %LTOBJ% `test -f ./%SOURCE% || echo
'$(srcdir)/'`%SOURCE%
endif %?LIBTOOL%
- target-specific rules and solaris make?,
Assar Westerlund <=