automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

creating generic am files to be auto included by automake


From: Mr E_T
Subject: creating generic am files to be auto included by automake
Date: Fri, 25 Apr 2003 21:09:29 +0800 (WST)

Are there plans to allow a programmer to add generic am files to his package as
in the form of aclocal m4 files. Say to complement an m4 macro?

It would probably make thing easier for package designers.

I was thinking about somthing like automating things like this -

configure.ac
...
AC_ARG_ENABLE([final],
              [AC_HELP_STRING([--enable-final],
                           [build size optimized application - memory hungry])],
          [case "${enableval}" in
             yes) final=true ;;
             no)  final=false ;;
             *)   AC_MSG_ERROR(bad value ${enableval} for --enable-final) ;;
           esac],[final=false])
AM_CONDITIONAL(PKG_FINAL,test x$final = xtrue)

...

and in the Makefile.am

HMM_SOURCES = .....
if CG_FINAL
  nodist_cgtest_SOURCES = cgtest_final.cpp
  EXTRA_DIST += $(HMM_SOURCES)
else
  cgtest_SOURCES = $(HMM_SOURCES)
endif

...

if PKG_FINAL
  %_final.cpp: Makefile
        @$(ECHO) "preparing $@"
        @$(ECHO) $(ECHO_N) > $@
        @for h in $(HMM_SOURCES) ;\
          do \
            $(ECHO) $(ECHO_N) '#include "' >> $@ ; \
            $(ECHO) $(ECHO_N) $$h >> $@ ; \
            $(ECHO) '"' >> $@; \
          done
endif

...

If a programmer could put a "generic verison of the above int a autoincluded m4
file tagged to the m4 macro above the the stub could be used by any programmer
wanting to use the package .

currently the kde developers use a perl script to physically change the
Makefile.in before autoconf converts it to a Makefile.

A solution like this would make things a lot easier.

 --
regs MR E_T
_______________________
\                      \
  \   OOHH I hate TYPOS  \
    \                      \
      ~~~~~~~~~~~~~~~~~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]