applied patch, slightly tweaked
[p5sagit/p5-mst-13.2.git] / x2p / Makefile.SH
index 30201bd..3a8c012 100755 (executable)
@@ -55,6 +55,10 @@ PATH_SEP = $p_
 
 FIRSTMAKEFILE = $firstmakefile
 
+# how to tr(anslate) newlines
+
+TRNL = '$trnl'
+
 .SUFFIXES: .c \$(OBJ_EXT)
 
 !GROK!THIS!
@@ -95,13 +99,13 @@ lintflags = -phbvxac
        $(CCCMD) -DPERL_FOR_X2P $*.c
 
 all: $(public) $(private) $(util)
-       touch all
+       @echo " "
 
 compile: all
        $(REALPERL) -I../lib ../utils/perlcc -regex 's/$$/.exe/' $(plextract) -prog -verbose dcf -log ../compilelog;  
 
 a2p: $(obj) a2p$(OBJ_EXT)
-       $(CC) $(LDFLAGS) $(obj) a2p$(OBJ_EXT) $(libs) -o a2p
+       $(CC) -o a2p $(LDFLAGS) $(obj) a2p$(OBJ_EXT) $(libs)
 
 # I now supply a2p.c with the kits, so the following section is
 # used only if you force byacc to run by saying
@@ -110,12 +114,13 @@ a2p: $(obj) a2p$(OBJ_EXT)
 run_byacc:     FORCE
        @ echo Expect many shift/reduce and reduce/reduce conflicts
        $(BYACC) a2p.y
+       rm -f a2p.c
        mv y.tab.c a2p.c
 
 # We don't want to regenerate a2p.c, but it might appear out-of-date
 # after a patch is applied or a new distribution is made.
 a2p.c: a2p.y
-       -@touch a2p.c
+       -@sh -c true
 
 a2p$(OBJ_EXT): a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h \
                ../handy.h ../config.h str.h hash.h
@@ -140,13 +145,13 @@ depend: $(mallocsrc) ../makedepend
        sh ../makedepend MAKE=$(MAKE)
 
 clist:
-       echo $(c) | tr ' ' '\012' >.clist
+       echo $(c) | tr ' ' $(TRNL) >.clist
 
 hlist:
-       echo $(h) | tr ' ' '\012' >.hlist
+       echo $(h) | tr ' ' $(TRNL) >.hlist
 
 shlist:
-       echo $(sh) | tr ' ' '\012' >.shlist
+       echo $(sh) | tr ' ' $(TRNL) >.shlist
 
 # These should be automatically generated