I am new to Autoconf, found it very useful I want my existing which earlier didnot use autoconf, now what I want to use Autoconf what problem I am facing my project used some what different style for arrangement of source code files, object files, and executable files. I mean ------------------------------------------------------------------------------------------------- $ ls -R c2vcg7 c2vcg7: doc/ Makefile src/ c2vcg7/doc: c/ img/ Makefile texfiles/ txt/ c2vcg7/doc/c: bfs.c empctl.c ins.c joinary.c setu.c c2vcg7/doc/img: asc.ps bfs.ps brt.ps empctl.ps ins.ps jary.ps mai.ps parsetok.ps scpyfmt.ps setu.ps c2vcg7/doc/texfiles: certificate.tex report.tex srccode.tex c2vcg7/doc/txt: c2vcg11.txt c2vcg12.txt c2vcg13.txt c2vcg1.txt c2vcg7/src: c2vcg.h dbugh.c gramcalls.c gram.y main.c Makefile scan.l ------------------------------------------------------------------------------------------------- this is my source tree and this is my c2vcg/Makefile ----------------------------------------------------------------------------------------------- # COMMANDS CAT = cat CC = gcc CP = cp DVI2PDF = dvipdf DVI2PS = dvips ECHO = echo INSTALL = install LEX = flex -I MAKE = make MKDIR = mkdir MV = mv RM = rm SED = sed TEX = latex YACC = bison -y # FLAGS CFLAGS = -O -g -Wall -DDEBUG -DSHOWRESOUS IFLAGS = LFLAGS = YFLAGS = -d bindir = ./bin srcdir = ./src objdir = ./obj doc = ./doc src = ${srcdir}/main.c ${srcdir}/dbugh.c ${srcdir}/gramcalls.c header = ${srcdir}/gram.h ${srcdir}/c2vcg.h obj = ${objdir}/gram.o ${objdir}/scan.o ${objdir}/main.o \ ${objdir}/gramcalls.o ${objdir}/dbugh.o ${bindir}/c2vcg : ${obj} ${header} -[ ! -d ${bindir} ] && $(MKDIR) ${bindir} ${CC} ${CFLAGS} ${obj} -o $@ ${objdir}/%.o: ${srcdir}/%.c ${srcdir}/c2vcg.h ${srcdir}/dsscall.h -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} ${CC} ${CFLAGS} ${IFLAGS} ${LFLAGS} -c $< -o $@ ${srcdir}/gram.h: ${srcdir}/gram.y ${objdir}/gram.o: ${srcdir}/gram.y ${srcdir}/gramcalls.h ${objdir}/%.o: ${srcdir}/%.y -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} $(RM) -f ${<:y=h} ${YACC} ${YFLAGS} $< $(MV) -f y.tab.c ${<:y=c} $(MV) -f y.tab.h ${<:y=h} ${CC} ${CFLAGS} ${IFLAGS} ${LFLAGS} -c ${<:y=c} -o $@ $(RM) -f ${<:y=c} ${objdir}/scan.o: ${srcdir}/scan.l ${srcdir}/gram.h ${objdir}/%.o: ${srcdir}/%.l -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} ${LEX} $< $(MV) -f lex.yy.c ${<:l=c} ${CC} ${CFLAGS} ${IFLAGS} ${LFLAGS} -c ${<:l=c} -o $@ $(RM) -f ${<:l=c} .PHONY: clean cleanbackup distclean all all: ${bindir}/c2vcg ${doc}/postscripts/report.ps $(MAKE) postscripts/report.ps -C ${doc} $(MAKE) ${bindir}/c2vcg clean : $(RM) -f ${srcdir}/gram.c ${srcdir}/gram.h ${srcdir}/scan.c c2vcg.log *.log $(RM) -Rf ${objdir} $(MAKE) clean -C ${doc} cleanbackup: $(RM) -f ${srcdir}/*~ ${srcdir}/\#* *~ \#* distclean: $(RM) -Rf ${bindir} $(MAKE) clean $(MAKE) cleanbackup $(MAKE) distclean -C ${doc} install: ${bindir}/c2vcg $(INSTALL) ${bindir}/c2vcg /usr/bin/ $(MAKE) install -C ${doc} ----------------------------------------------------------------------------------------------- and c2vcg/doc/Makefile ----------------------------------------------------------------------------------------------- TEX = latex ECHO = echo MAKE = make SED = sed CP = cp CAT = cat MKDIR = mkdir DVI2PDF = dvipdf DVI2PS = dvips sample_c_pgm = c/bfs.c c/joinary.c c/empctl.c c/setu.c c/ins.c images = img/asc.ps img/bfs.ps img/ins.ps img/parsetok.ps img/brt.ps\ img/jary.ps img/scpyfmt.ps img/empctl.ps img/mai.ps img/setu.ps srcdir = texfiles objdir = objtex dvis = dvis pdfs = pdfs postscripts = ./postscripts #.DELETE_ON_ERROR: ${dvis}/article.tex ${dvis}/book.tex ${dvis}/report.tex\ # ${dvis}/src-article.tex ${dvis}/src-book.tex ${dvis}/src-report.tex ${dvis}/%.dvi : ${objdir}/%.tex ${objdir}/src-%.tex ${objdir}/certificate-%.tex ${sample_c_pgm}\ ${images} -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} cd ${objdir} && ${TEX} $(<F) && ${TEX} $(<F) -[ ! -d ${dvis} ] && $(MKDIR) ${dvis} mv $(<:.tex=.dvi) $@ .PRECIOUS: ${objdir}/%.tex ${objdir}/%.tex: make $@ ${objdir}/certificate-article.tex : ${srcdir}/certificate.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} @echo; echo; echo -n like to put Certificate in \`$(@F)\' \[n\] -@read response && if [ $$response = "y" -o $$response = "Y" ]; then $(SED) -e "s/\section{/\subsection{/g; s/\chapter/\section/g" $< > $@ else $(ECHO) \\newpage > $@; fi ${objdir}/certificate-book.tex ${objdir}/certificate-report.tex : ${srcdir}/certificate.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} @echo; echo; echo -n like to put Certificate in \`$(@F)\' \[n\] -@read response && if [ $$response = "y" -o $$response = "Y" ]; then $(CP) -f $< $@ else $(ECHO) \\newpage > $@; fi ${objdir}/src-article.tex: ${srcdir}/srccode.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} @echo; echo; echo -n like to put Source Code in \`$(@F)\' \[n\] -@read response && if [ $$response = "y" -o $$response = "Y" ]; then $(SED) -e "s/\section{/\subsection{/g; s/\chapter/\section/g" $< > $@ else $(ECHO) \\newpage > $@; fi ${objdir}/src-book.tex ${objdir}/src-report.tex: ${srcdir}/srccode.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} @echo; echo; echo -n like to put Source Code in \`$(@F)\' \[n\] -@read response && if [ $$response = "y" -o $$response = "Y" ]; then $(CP) -f $< $@ else $(ECHO) \\newpage > $@; fi ${objdir}/article.tex: ${srcdir}/report.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} $(SED) -e "s/{report}/{article}/; s/\section{/\subsection{/g; s/\chapter/\section/g; s/\\include{srccode}/\\include{src-article}/; s/\\include{certificate}/\\include{certificate-article}/" $< > $@ ${objdir}/book.tex: ${srcdir}/report.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} $(SED) -e "s/{report}/{book}/; s/\\include{srccode}/\\include{src-book}/; s/\\include{certificate}/\\include{certificate-book}/" $< > $@ ${objdir}/report.tex: ${srcdir}/report.tex -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} $(SED) -e "s/\\include{srccode}/\\include{src-report}/; s/\\include{certificate}/\\include{certificate-report}/" $< > $@ ${pdfs}/%.pdf: ${dvis}/%.dvi -[ ! -d ${pdfs} ] && $(MKDIR) ${pdfs} ${DVI2PDF} $< $@ ${postscripts}/%.ps: ${dvis}/%.dvi -[ ! -d ${postscripts} ] && $(MKDIR) ${postscripts} ${DVI2PS} $< -o $@ .PHONY: clean distclean cleanunwanted clean: rm -Rf ${objdir} distclean: -rm -Rf ${dvis} ${pdfs} ${postscripts} make clean cleanunwanted: rm -f *~ \#* c/{*~,\#*} img/{*~,\#*} txt/{*~,\#*} ----------------------------------------------------------------------------------------------- And this is working well, So when I tried to use autotools with it I found in Documentation that I have to put my source code files in srcdir and which is top_srcdir which in this case c2vcg and I want to to seperate srcdir as c2vcg/srcdir and objects in c2vcg/obj and executable c2vcg in c2vcg/bin You can see I made these all arrangement in my c2vcg/Makefile very well...... If you are bothering that in my source tree c2vcg/bin c2vcg/obj c2vcg/obj does not exit, then you can see in c2vcg/Makefile -[ ! -d ${objdir} ] && $(MKDIR) ${objdir} construct, by this I made arrangement to seperate all *.c *.h *.y *.l in c2vcg/src all *.o in c2vcg/obj target executable c2vcg in c2vcg/bin SO my question is that this arrangement I can not get even using Autotools (autoscan, autoconf, autoheader, automake,...etc) If anyone Please care to reply. Regard Sharad _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf