[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Awk shell variables inside make
From: |
Domingo A. Siliceo |
Subject: |
Awk shell variables inside make |
Date: |
Wed, 13 Aug 2008 11:35:31 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080227) |
Hello.
I'm using GNU Make 3.81 under xUbuntu 8.04
I have the following lines inside a Makefile (simplified here)
----------8<--------------------8<---------------------
all: placas.html discos.html
# cd /home/dsiliceo/Trabajo/Site_build
mv -v placas.html ../Site/placas.html
mv -v discos.html ../Site/discos.html
#
# proceso de placas
#
placas.html: placas placas_1.html placas_2.html pie.html
# Concatenamos las tres partes del fichero
cat placas_1.html placas_2.html pie.html > placas.html
placas_2.html:
# generamos el contenido de la tabla
awk -F";" '{if ($11 == 1) {print \
"<tr><td><small>$2</small><td><small>$4</small><td><small>$3</small><td><small><a\
href="$8">página del fabricante</a></small><td\
align=right><small>$10€</small>"} }; END {print "</table><p>"}'\
placas >> placas_2.html
[...Makefile follows...]
------------8<---------------8<----------------------
The problem I'm having is that the awk command doesn't interprets the
shell variables, thus I'm obtaining a placas_2.html only with the HTML
tags. Should I write these shell variables diferently?
I hope I explained myself clear.
Thanks.
--
Domingo A. Siliceo
Orihuela
:wq
- Awk shell variables inside make,
Domingo A. Siliceo <=