File: genmb

package info (click to toggle)
nut 0.45.5-rel-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,984 kB
  • ctags: 2,146
  • sloc: ansic: 22,216; sh: 1,138; makefile: 405
file content (27 lines) | stat: -rwxr-xr-x 797 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh
#
# Network UPS Tools: models/genmb
#
# This is a hack to create a bunch of identical rules for building
# the drivers without relying on either the % patterns of GNU Make or the
# for...endfor of BSD Make.  They're both neat, but they're also not
# portable.  Ugh.
#

MFMB=Makefile.modelbuild

rm -f $MFMB

cat > $MFMB << EOF
# Network UPS Tools: models/$MFMB
#
# WARNING: This file is generated by the genmb script.  Any changes
#          to this file will be erased the next time it runs!
#
EOF

for i in $*
do
  echo "$i: $i.o main.o upscommon.o ../include/shared.h ../include/shared-tables.h ../common/upsconf.o ../common/parseconf.o \$(LIBDEP)" >> $MFMB
  echo "	\$(CC) \$(CFLAGS) -o $i $i.o main.o upscommon.o ../common/upsconf.o ../common/parseconf.o \$(LIBOBJ)" >> $MFMB
done