develooper Front page | perl.perl5.porters | Postings from November 1999

[PATCH: 5.005_62]make makedepend cleanup cpp for generated parser file (os390)

From:
Peter Prymmer
Date:
November 29, 1999 22:25
Subject:
[PATCH: 5.005_62]make makedepend cleanup cpp for generated parser file (os390)
Message ID:
199911300625.WAA23709@brio.forte.com

The follow patch adds an extra #endif to the extracted UU/perly.c.c 
temporary file generated by makedepend on os390 only.  Note that perly.c 
as shipped with perl is not the one used by os390, instead a special EBCDIC 
version of perly.c is yacced out of perly.y on site.  The extra #endif is 
needed to appease the compiler in cpp (-E) mode to yield a cleaner Configure 
run.  The sed snippet "-e 's|\\$||'" unfortunately turns a 
"#define FOO \\n#endif" combo into an apparent missing #endif.  However, 
removing the s|\\$|| messes up the cpp run for a _lot_ of other files and is 
not really tenable.  With this patch applied the make makedepend step
looks nice and clean like so:

 Finding dependencies for perl.o.
 Finding dependencies for perly.o.
 Finding dependencies for pp.o.

and the build is not adversely affected (at least on os390 - I haven't 
tested other machines).

This could apply to 5.005_62 and with offsets to _03 
as well:


--- makedepend.SH.orig	Mon Nov 29 18:05:08 1999
+++ makedepend.SH	Mon Nov 29 18:10:43 1999
@@ -130,6 +130,9 @@
 	-e 's|\\$||' \
 	-e p \
 	-e '}' ) >UU/$file.c
+    if [ "$osname" = os390 -a "$file" = perly.c ]; then
+        $echo '#endif' >>UU/$file.c
+    fi
     $cppstdin $finc -I. $cppflags $cppminus <UU/$file.c |
     $sed \
 	-e '/^#.*<stdin>/d' \
End of Patch.

Peter Prymmer




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About