[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(mgp-users 00060) why insist on perl...



Hi,

checking the diffs between the 981102 and 981116 snaps, i notice
(thanks!) that my short program ctlwords.c has been integrated in the
sources to build ctlwords.h, but one thing i really don't understand:

-ctlwords.h: $(srcdir)/ctlwords.pl $(srcdir)/globals.c
-       $(PERL) $(srcdir)/ctlwords.pl < $(srcdir)/globals.c > ctlwords.h
+ctlwords.h: $(srcdir)/ctlwords.c $(srcdir)/ctlwords.pl
$(srcdir)/globals.c
+      if test -x $(PERL); then \
+          $(PERL) $(srcdir)/ctlwords.pl < $(srcdir)/globals.c > ctlwords.h ; \
+      else \
+              $(CC) -o ./ctlwords $(srcdir)/ctlwords.c; \
+              ./ctlwords < $(srcdir)/globals.c > ctlwords.h; \
+      fi


is it really necessary to try the perl version first, given that the C
code should do the same job and it is guaranteed to work everywhere (if
we don't have a C compiler we are in BIG trouble...) ?

It is not because i wrote that code, i just think that in the interest
of portability and maintainability it is better to remove redundancies
from the sources wherever possible.

	cheers
	luigi
-----------------------------+--------------------------------------
Luigi Rizzo                  |  Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it    |  Universita' di Pisa
tel: +39-50-568533           |  via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522           |  http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________