Makefile匹配任何目标/任务

时间:2015-12-19 10:06:25

标签: bash shell makefile

我想编写一个可以与任何任务一起运行的makefile,只需回显所有任务名称 有没有办法做到这一点?

像:

%.%: 
    echo "$@"

1 个答案:

答案 0 :(得分:3)

假设您的make是GNU make或类似的,请使用以下Makefile:

<html>
  <head>
    <title></title>
    <style type="text/css">
    .test{display:none;}
    .test:nth-child(2) {
       display: block !important;
     }
</style>
 </head>
 <body>
<div class="ProductPriceRating">
        <strong>$47.00</strong>

        <div class="test"><input type="button" class="btn" id="hello_123" onclick="window.open('1234')" value="test.com"></div>
        <div class="test"><input type="button" class="btn" id="hello_123" onclick="window.open('1234')" value="test.com"></div>
        <div class="test"><input type="button" class="btn" id="hello_123" onclick="window.open('1234')" value="test.com"></div>
        <div class="test"><input type="button" class="btn" id="hello_123" onclick="window.open('1234')" value="test.com"></div>
        <div class="test"><input type="button" class="btn" id="hello_123" onclick="window.open('1234')" value="test.com"></div>

查看结果:

.PHONY: all

%:
       @echo "Here I am! $@"