sys: Split up syscall.lo 'echo's
authorAndrew Deason <adeason@sinenomine.net>
Wed, 3 Oct 2012 19:44:46 +0000 (14:44 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Sun, 7 Oct 2012 13:01:13 +0000 (06:01 -0700)
Currently we echo a string to syscall.lo to generate it. However,
'echo' is often a shell builtin, and some shells (such as bash) do not
interpret escape codes like \n unless the -e option is given. So, this
results in syscall.lo containing a single commented line, which
results in .libs/libafsrpc_sys.a not getting created, which later on
causes errors.

Instead, just split the syscall.lo generation into separate echo
invocations, to make sure we work everywhere.

Change-Id: I8a6ed42a0837086de604be0936d830f0f4558ebf
Reviewed-on: http://gerrit.openafs.org/8202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/sys/Makefile.in

index ff6a9f2..6ffc2ee 100644 (file)
@@ -135,9 +135,11 @@ syscall.lo: syscall.s
                touch syscall.c ; \
                $(CC) $(AFS_CFLAGS) -c syscall.c -o syscall.o; \
                ;; \
-       esac ; \
-       echo "# Generated by libtool (GNU libtool) 0.0.0\npic_object='syscall.o'\nnon_pic_object='syscall.o'" > syscall.lo
-
+       esac
+       rm -f $@
+       echo "# Generated by libtool (GNU libtool) 0.0.0" > $@
+       echo "pic_object='syscall.o'" >> $@
+       echo "non_pic_object='syscall.o'" >> $@
 
 afssyscalls.lo: afssyscalls.c afssyscalls.h
 glue.lo: glue.c afssyscalls.h