[hackers] [libixp] Change .O extension to .out || Kris Maglione

From: <hg_AT_suckless.org>
Date: Thu, 3 Sep 2009 18:28:24 +0000 (UTC)

changeset: 110:a9349bbf7123
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Sep 03 14:20:44 2009 -0400
files: mk/hdr.mk mk/many.mk mk/one.mk
description:
Change .O extension to .out

diff -r 0311806ee3f0 -r a9349bbf7123 mk/hdr.mk
--- a/mk/hdr.mk Sun Sep 21 11:39:51 2008 +0800
+++ b/mk/hdr.mk Thu Sep 03 14:20:44 2009 -0400
@@ -14,9 +14,17 @@
 MKCFG:=${shell $(MKCFGSH)}
 MKCFG!=${MKCFGSH}
 include $(MKCFG)
+# and this:
+# Try to find a sane shell. /bin/sh is a last resort, because it's
+# usually bash on Linux, which means, it's painfully slow.
+BINSH := $(shell \
+ if [ -x /bin/dash ]; then echo /bin/dash; \
+ elif [ -x /bin/ksh ]; then echo /bin/ksh; \
+ else echo /bin/sh; fi)
+BINSH != echo /bin/sh
 
 .SILENT:
-.SUFFIXES: .O .o .o_pic .c .sh .rc .$(SOEXT) .awk .1 .depend .install .uninstall .clean
+.SUFFIXES: .out .o .o_pic .c .sh .rc .$(SOEXT) .awk .1 .man1 .depend .install .uninstall .clean
 all:
 
 .c.depend:
@@ -28,62 +36,64 @@
 
 .c.o:
         $(COMPILE) $@ $<
-
 .c.o_pic:
         $(COMPILEPIC) $@ $<
 
-.o.O:
+.o.out:
         $(LINK) $@ $<
-
-.c.O:
+.c.out:
         $(COMPILE) ${<:.c=.o} $<
         $(LINK) $@ ${<:.c=.o}
 
-.sh.O:
+.sh.out:
         echo FILTER $(BASE)$<
         $(FILTER) $< >$@
         sh -n $@
         chmod 0755 $@
-.rc.O .awk.O:
+.rc.out .awk.out:
         echo FILTER $(BASE)$<
         $(FILTER) $< >$@
         chmod 0755 $@
+.man1.1:
+ echo TXT2TAGS $(BASE)$<
+ txt2tags -o- $< | $(FILTER) >$@
 
-.O.install:
+.out.install:
         echo INSTALL $$($(CLEANNAME) $(BASE)$*)
- cp -f $< $(BIN)/$*
- chmod 0755 $(BIN)/$*
-.O.uninstall:
+ cp -f $< $(DESTDIR)$(BIN)/$*
+ chmod 0755 $(DESTDIR)$(BIN)/$*
+.out.uninstall:
         echo UNINSTALL $$($(CLEANNAME) $(BASE)$*)
- rm -f $(BIN)/$*
+ rm -f $(DESTDIR)$(BIN)/$*
 
 .a.install .$(SOEXT).install:
         echo INSTALL $$($(CLEANNAME) $(BASE)$<)
- set -e; \
- file=$<; \
- cp -f $< $(LIBDIR)/$${file##*/}; \
- #chmod 0644 $(LIBDIR)/$${file##*/}
+ cp -f $< $(DESTDIR)$(LIBDIR)/$<
+ chmod 0644 $(DESTDIR)$(LIBDIR)/$<
 .a.uninstall .$(SOEXT).uninstall:
         echo UNINSTALL $$($(CLEANNAME) $(BASE)$<)
- rm -f $(LIBDIR)/$<
+ rm -f $(DESTDIR)$(LIBDIR)/$<
 
 .h.install:
         echo INSTALL $$($(CLEANNAME) $(BASE)$<)
- cp -f $< $(INCLUDE)/$<
- chmod 0644 $(INCLUDE)/$<
+ cp -f $< $(DESTDIR)$(INCLUDE)/$<
+ chmod 0644 $(DESTDIR)$(INCLUDE)/$<
 .h.uninstall:
         echo UNINSTALL $$($(CLEANNAME) $(BASE)$<)
- rm -f $(INCLUDE)/$<
+ rm -f $(DESTDIR)$(INCLUDE)/$<
 
 .1.install:
- echo INSTALL man $$($(CLEANNAME) $*'(1)')
- $(FILTER) $< >$(MAN)/man1/$<
- chmod 0644 $(MAN)/man1/$<
+ set -e; \
+ man=1; \
+ path="$(MAN)/man$$man/$*.$$man"; \
+ echo INSTALL man $$($(CLEANNAME) "$(BASE)/$*($$man)"); \
+ cp "$<" $(DESTDIR)"$$path"; \
+ chmod 0644 $(DESTDIR)"$$path"
 .1.uninstall:
         echo UNINSTALL man $$($(CLEANNAME) $*'(1)')
- rm -f $(MAN)/man1/$<
+ rm -f $(DESTDIR)$(MAN)/man1/$<
 
-.O.clean:
+.out.clean:
         echo CLEAN $$($(CLEANNAME) $(BASE)$<)
         rm -f $< || true 2>/dev/null
         rm -f $*.o || true 2>/dev/null
diff -r 0311806ee3f0 -r a9349bbf7123 mk/many.mk
--- a/mk/many.mk Sun Sep 21 11:39:51 2008 +0800
+++ b/mk/many.mk Thu Sep 03 14:20:44 2009 -0400
@@ -1,4 +1,4 @@
-PROGS = ${TARG:=.O}
+PROGS = ${TARG:=.out}
 
 all: $(OFILES) $(PROGS)
 
@@ -12,7 +12,7 @@
         echo ' Bin: $(BIN)'
 
 manyclean:
- for i in ${TARG:=.o} ${TARG:=.O} $(OFILES); do \
+ for i in ${TARG:=.o} ${TARG:=.out} $(OFILES); do \
                 [ -e $$i ] && \
                 echo CLEAN $$($(CLEANNAME) $(BASE)$$i); \
                 rm -f $$i; \
diff -r 0311806ee3f0 -r a9349bbf7123 mk/one.mk
--- a/mk/one.mk Sun Sep 21 11:39:51 2008 +0800
+++ b/mk/one.mk Thu Sep 03 14:20:44 2009 -0400
@@ -1,4 +1,4 @@
-PROG = $(TARG).O
+PROG = $(TARG).out
 OFILES = ${OBJ:=.o}
 
 all: $(PROG)
Received on Thu Sep 03 2009 - 18:28:24 UTC

This archive was generated by hypermail 2.2.0 : Thu Sep 03 2009 - 18:36:05 UTC