[w3m-dev 04022] $^

YONETANI Tomokazu <[email protected]>
Newsgroups gmane.comp.web.w3m.devel
Message-ID <[email protected]>
2chGNU makeautomatic variable
GNU make
GNU makeBSD make

$ cat m
PHONY: foo FOO BAR
foo: FOO BAR
	@echo ' $$^: ' $^
	@echo ' $$>: ' $>
FOO BAR:

$ make -f m
 $^:
 $>:  FOO BAR
$ gmake -f m
 $^:  FOO BAR
 $>:

$^$^ $>
(PC-UNIX)
:


Index: Makefile.in
===================================================================
RCS file: /cvsroot/w3m/w3m/Makefile.in,v
retrieving revision 1.29
diff -u -r1.29 Makefile.in
--- Makefile.in	10 Oct 2003 16:33:13 -0000	1.29
+++ Makefile.in	30 Nov 2003 00:00:36 -0000
@@ -115,6 +115,7 @@
 HELP_ALLFILES=w3mhelp-w3m_en.html w3mhelp-w3m_ja.html \
 	w3mhelp-lynx_en.html w3mhelp-lynx_ja.html
 
+DEFUNS=main.c menu.c
 SCRIPTSUBDIRS= scripts
 SUBDIRS = $(SCRIPTSUBDIRS) w3mimg libwc po
 .PHONY: $(SUBDIRS)
@@ -139,9 +140,9 @@
 keybind_lynx.o: funcname2.h
 parsetagx.o: html.c
 
-funcname.tab: main.c menu.c
+funcname.tab: $(DEFUNS)
 	(echo '#define DEFUN(x,y,z) x y';\
-	 sed -ne '/^DEFUN/{p;n;/^[ 	]/p;}' $^) | $(CPP) - | \
+	 sed -ne '/^DEFUN/{p;n;/^[ 	]/p;}' $(DEFUNS)) | $(CPP) - | \
 	 awk '$$1 ~ /^[_A-Za-z]/ { \
 	       for (i=2;i<=NF;i++) { print $$i, $$1} \
 	 }' > $@
Index: w3mimg/Makefile.in
===================================================================
RCS file: /cvsroot/w3m/w3m/w3mimg/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- w3mimg/Makefile.in	10 Oct 2003 16:33:13 -0000	1.6
+++ w3mimg/Makefile.in	30 Nov 2003 00:00:36 -0000
@@ -17,7 +17,7 @@
 all: @IMGTARGETS@ w3mimg.a
 
 w3mimg.a: $(IMGOBJS)
-	$(AR) rv $@ $^
+	$(AR) rv $@ $(IMGOBJS)
 	$(RANLIB) $@
 
 w3mimg.o: w3mimg.c


w3m-dev-admin
ML
?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.