In the last episode (Jun 11), Ruslan Ermilov said:
> Just as a precaution, does anyone have any objections to my removing
> of these funny $^ sequences from Makefile.yp?  They were apparently
> used to insert something into the map generation pipeline just before
> the yp_mkdb(8) invokation, but recent additions to this file did not
> follow this "rule".
>
>  ypservers: $(YPSERVERS)
>       @echo "Updating [EMAIL PROTECTED]"
>       $(CAT) $(YPSERVERS) | \
> -     $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*") print $$0"\t"$$0 }' $^ \
> +     $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*") print $$0"\t"$$0 }' \
>               | $(DBLOAD) -i $(YPSERVERS) -o $(YPMAPDIR)/$@ - $(TMP); \
>               $(RMV) $(TMP) $@
>       @$(DBLOAD) -c

$^ is gmake syntax for "all prerequisites", but bsd make has never
recognized that particular variable, so afaik it has always been
ignored (rev 1.1 even has them).

There's also a useless use of cat in there.  If you wanted, you could
do something like this (for all targets except netgroup, which calls
revnetgroup inbetween cat and awk):

 ypservers: $(YPSERVERS)
        @echo "Updating [EMAIL PROTECTED]"
-       $(CAT) $(YPSERVERS) | \
-       $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*") print $$0"\t"$$0 }' $^ \
+       $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*") print $$0"\t"$$0 }' $(YPSERVERS) \
                | $(DBLOAD) -i $(YPSERVERS) -o $(YPMAPDIR)/$@ - $(TMP); \
                $(RMV) $(TMP) $@
        @$(DBLOAD) -c

-- 
        Dan Nelson
        [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to