Add "pretty" build option
[openafs.git] / src / comerr / Makefile.in
index 7dc6341..104ba8b 100644 (file)
@@ -6,12 +6,10 @@
 
 srcdir=@srcdir@
 include @TOP_OBJDIR@/src/config/Makefile.config
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
+include @TOP_OBJDIR@/src/config/Makefile.lwp
 
-all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libcom_err.a
+
+all: compile_et ${TOP_INCDIR}/afs/com_err.h ${TOP_INCDIR}/afs/error_table.h ${TOP_INCDIR}/afs/mit-sipb-cr.h ${TOP_LIBDIR}/libafscom_err.a
 
 buildtools: compile_et
 
@@ -24,7 +22,7 @@ ${TOP_INCDIR}/afs/error_table.h: error_table.h
 ${TOP_INCDIR}/afs/mit-sipb-cr.h: mit-sipb-cr.h
        ${INSTALL_DATA} $? $@
 
-${TOP_LIBDIR}/libcom_err.a: libcom_err.a
+${TOP_LIBDIR}/libafscom_err.a: libafscom_err.a
        ${INSTALL_DATA} $? $@
 
 et_lex.lex.c: et_lex.lex.l
@@ -32,14 +30,14 @@ et_lex.lex.c: et_lex.lex.l
        $(LEX) -t $(srcdir)/et_lex.lex.l > et_lex.lex.c
 
 compile_et:    compile_et.o error_table.o
-       case $(SYS_NAME) in \
+       $(Q)case $(SYS_NAME) in \
        *_linux* | *_umlinux* ) \
-       ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil;; \
+       $(AFS_LDRULE_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr;; \
        * ) \
-       ${CC} ${CFLAGS} -o compile_et compile_et.o error_table.o -L${TOP_LIBDIR} -lafsutil -ll;; \
+       $(AFS_LDRULE_NOQ) compile_et.o error_table.o -L${TOP_LIBDIR} -lopr -ll;; \
        esac
 
-libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
+libafscom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
        $(RM) -f $@
        $(AR) crv $@ error_msg.o et_name.o com_err.o AFS_component_version_number.o
        $(RANLIB) $@
@@ -48,13 +46,12 @@ libcom_err.a: error_msg.o et_name.o com_err.o AFS_component_version_number.o
 # When we build this file, we're using a .c file that's in the object directory,
 # so we need to add the source directory to the includes to pick up local headers.
 #
-error_table.o: error_table.c
-       $(CC) $(CFLAGS) -I${srcdir} @CFLAGS_NOUNUSED@ -c $<
+CFLAGS_error_table.o= -I${srcdir} @CFLAGS_NOUNUSED@ @CFLAGS_NOOLDSTYLE@
 
 #
 # Installation targets
 #
-install: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
+install: compile_et com_err.h error_table.h mit-sipb-cr.h libafscom_err.a
        ${INSTALL} -d ${DESTDIR}${bindir}
        ${INSTALL} -d ${DESTDIR}${includedir}/afs
        ${INSTALL} -d ${DESTDIR}${libdir}/afs
@@ -62,9 +59,9 @@ install: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
        ${INSTALL_DATA} ${srcdir}/com_err.h ${DESTDIR}${includedir}/afs/com_err.h
        ${INSTALL_DATA} ${srcdir}/error_table.h ${DESTDIR}${includedir}/afs/error_table.h
        ${INSTALL_DATA} ${srcdir}/mit-sipb-cr.h ${DESTDIR}${includedir}/afs/mit-sipb-cr.h
-       ${INSTALL_DATA} libcom_err.a ${DESTDIR}${libdir}/afs/libcom_err.a
+       ${INSTALL_DATA} libafscom_err.a ${DESTDIR}${libdir}/afs/libafscom_err.a
 
-dest: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
+dest: compile_et com_err.h error_table.h mit-sipb-cr.h libafscom_err.a
        ${INSTALL} -d ${DEST}/bin
        ${INSTALL} -d ${DEST}/include/afs
        ${INSTALL} -d ${DEST}/lib/afs
@@ -72,11 +69,11 @@ dest: compile_et com_err.h error_table.h mit-sipb-cr.h libcom_err.a
        ${INSTALL_DATA} ${srcdir}/com_err.h ${DEST}/include/afs/com_err.h
        ${INSTALL_DATA} ${srcdir}/error_table.h ${DEST}/include/afs/error_table.h
        ${INSTALL_DATA} ${srcdir}/mit-sipb-cr.h ${DEST}/include/afs/mit-sipb-cr.h
-       ${INSTALL_DATA} libcom_err.a ${DEST}/lib/afs/libcom_err.a
+       ${INSTALL_DATA} libafscom_err.a ${DEST}/lib/afs/libafscom_err.a
 
 clean:
        $(RM) -f *~ \#* *.bak *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \
-               *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libcom_err.a \
+               *.cp *.fn *.ky *.log *.pg *.tp *.vr *.o libafscom_err.a \
                com_err.o compile_et et.ar TAGS y.tab.c lex.yy.c error_table.c \
                et_lex.lex.c test1.h test1.c test2.h test2.c \
                eddep makedep core AFS_component_version_number.c
@@ -85,6 +82,7 @@ test:
        cd test; $(MAKE)
 
 compile_et.o:  AFS_component_version_number.c
-error_table.o: et_lex.lex.c
+# specify yacc build product as a dependency so our .c.o rule will apply
+error_table.o: et_lex.lex.c error_table.c
 
 include ../config/Makefile.version