New Makefile structure

svn: r881
This commit is contained in:
Donald A. Peterson 2002-03-30 03:49:19 +00:00
parent d05d5e9dcf
commit ec61107440
6 changed files with 110 additions and 58 deletions

17
gramps/Makefile.comm.in Normal file
View File

@ -0,0 +1,17 @@
# Hold variable definitions needed by slave Makefiles
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
datadir = @datadir@/@PACKAGE@
INSTALL = @INSTALL@
sharedir = ${prefix}/share/gramps
GNOMEHELP = ${prefix}/share/gnome/help
GM = gramps-manual
EG = extending-gramps
DB2HTML = @DOCBOOKHTML@
@SET_MAKE@
# Ensure the correct "/bin/sh" for interpreting commands
# in case the user has some other shell environment
SHELL = @BINSH@

View File

@ -1,50 +1,40 @@
prefix = @prefix@ include Makefile.comm
exec_prefix = @exec_prefix@
bindir = @bindir@
datadir = @datadir@/@PACKAGE@
INSTALL = @INSTALL@
sharedir = ${prefix}/share/gramps
GNOMEHELP = ${prefix}/share/gnome/help
GM = gramps-manual
EG = extending-gramps
@SET_MAKE@ ifeq (${DB2HTML},)
DOCS =
else
DOCS = doc/${GM}/C doc/${EG}/C
endif
# Append ${DOCS} to the next line to generate documentation
DIRS = src src/plugins src/docgen src/filters src/data ${DOCS}
all: all:
(cd src; ${MAKE} all) @ for dir in ${DIRS}; do \
(cd src/plugins; ${MAKE} all) echo "Making all in $$dir"; \
(cd src/docgen; ${MAKE} all) (cd $$dir; ${MAKE} all); \
(cd src/filters; ${MAKE} all) done
(cd src/data; ${MAKE} all)
install: install:
(cd src; ${MAKE} install) @ for dir in ${DIRS}; do \
(cd src/plugins; ${MAKE} install) echo "Making install in $$dir"; \
(cd src/docgen; ${MAKE} install) (cd $$dir; ${MAKE} install); \
(cd src/filters; ${MAKE} install) done
(cd src/data; ${MAKE} install)
-${INSTALL} -d ${bindir} -${INSTALL} -d ${bindir}
-${INSTALL} -d ${GNOMEHELP}/${GM}/C
-${INSTALL} -d ${GNOMEHELP}/${EG}/C
-${INSTALL} doc/${GM}/C/${GM}/*.html ${GNOMEHELP}/${GM}/C
-${INSTALL} doc/${GM}/C/${GM}/*.png ${GNOMEHELP}/${GM}/C
-${INSTALL} doc/${EG}/C/${EG}/*.html ${GNOMEHELP}/${EG}/C
${INSTALL} gramps.sh ${bindir}/gramps ${INSTALL} gramps.sh ${bindir}/gramps
${INSTALL} doc/gramps.dtd ${sharedir} ${INSTALL} doc/gramps.dtd ${sharedir}
chmod +x ${bindir}/gramps chmod +x ${bindir}/gramps
uninstall: uninstall:
(cd src; ${MAKE} uninstall) @ for dir in ${DIRS}; do \
(cd src/plugins; ${MAKE} uninstall) echo "Making uninstall in $$dir"; \
(cd src/docgen; ${MAKE} uninstall) (cd $$dir; ${MAKE} uninstall); \
(cd src/filters; ${MAKE} uninstall) done
(cd src/data; ${MAKE} uninstall)
rm ${bindir}/gramps rm ${bindir}/gramps
clean: clean:
(cd src; ${MAKE} clean) @ for dir in ${DIRS}; do \
(cd src/plugins; ${MAKE} clean) echo "Making clean in $$dir"; \
(cd src/docgen; ${MAKE} clean) (cd $$dir; ${MAKE} clean); \
(cd src/filters; ${MAKE} clean) done
(cd src/data; ${MAKE} clean)
rm -f core *~ config.cache config.log config.status rm -f core *~ config.cache config.log config.status

View File

@ -1,8 +1,5 @@
prefix = @prefix@ include @top_srcdir@/Makefile.comm
exec_prefix = @exec_prefix@
bindir = @bindir@
datadir = @datadir@/@PACKAGE@
INSTALL = @INSTALL@
srcdir = @top_srcdir@ srcdir = @top_srcdir@
intl_libs = @INTLLIBS@ intl_libs = @INTLLIBS@
p15_inc = @P15_INCLUDES@ p15_inc = @P15_INCLUDES@
@ -14,11 +11,13 @@ CFLAGS = -fPIC -shared -O @CFLAGS@ @CPPFLAGS@ -I@includedir@
LDFLAGS = @LDFLAGS@ -L@libdir@ @LIBS@ LDFLAGS = @LDFLAGS@ -L@libdir@ @LIBS@
LANG = sv de fr es it pt_BR LANG = sv de fr es it pt_BR
@SET_MAKE@ # Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually
PYSRCS := ${wildcard *.py}
all: ${intl_libs} PYOBJS = ${PYSRCS:.py=.pyo}
chmod +x ${pycomp}
${pycomp} *.py all: ${intl_libs} ${PYOBJS}
intl15.so: intl.c intl15.so: intl.c
$(CC) $(CFLAGS) $(LDFLAGS) $(p15_inc) -DVER15 -o $@ intl.c $(CC) $(CFLAGS) $(LDFLAGS) $(p15_inc) -DVER15 -o $@ intl.c
@ -57,3 +56,12 @@ po/template.po: *.py *.glade */*.py */*.glade
clean: clean:
-rm -f core *.pyo *.pyc *.bak *~ -rm -f core *.pyo *.pyc *.bak *~
# Add PYTHON suffix rules to make's vocabulary
.SUFFIXES: .py .pyo
# How do we properly compile a python module?
.py.pyo:
chmod +x ${pycomp}
${pycomp} $<

View File

@ -1,3 +1,5 @@
include @top_srcdir@/Makefile.comm
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
@ -7,10 +9,13 @@ docgen = ${datadir}/docgen
srcdir = @top_srcdir@ srcdir = @top_srcdir@
pycomp = ${srcdir}/py-compile pycomp = ${srcdir}/py-compile
@SET_MAKE@ # Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually
PYSRCS := ${wildcard *.py}
all: PYOBJS = ${PYSRCS:.py=.pyo}
${pycomp} *.py
all: ${PYOBJS}
install: install:
${INSTALL} -d ${docgen} ${INSTALL} -d ${docgen}
@ -22,3 +27,11 @@ uninstall:
clean: clean:
-rm -f core *.pyo *.pyc *.bak *~ -rm -f core *.pyo *.pyc *.bak *~
# Add PYTHON suffix rules to make's vocabulary
.SUFFIXES: .py .pyo
# How do we properly compile a python module?
.py.pyo:
chmod +x ${pycomp}
${pycomp} $<

View File

@ -1,24 +1,36 @@
include @top_srcdir@/Makefile.comm
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
datadir = @datadir@/@PACKAGE@ datadir = @datadir@/@PACKAGE@
INSTALL = @INSTALL@ INSTALL = @INSTALL@
filters = ${datadir}/filters plugins = ${datadir}/plugins
srcdir = @top_srcdir@ srcdir = @top_srcdir@
pycomp = ${srcdir}/py-compile pycomp = ${srcdir}/py-compile
@SET_MAKE@ # Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually
PYSRCS := ${wildcard *.py}
all: PYOBJS = ${PYSRCS:.py=.pyo}
${pycomp} *.py
all: ${PYOBJS}
install: install:
${INSTALL} -d ${filters} ${INSTALL} -d ${plugins}
${INSTALL} *.py *.pyo ${datadir}/filters ${INSTALL} *.py *.pyo *.glade ${plugins}
uninstall: uninstall:
rm ${filters}/*.py ${filters}/*.pyo rm ${plugins}/*.py ${plugins}/*.pyo ${plugins}/*.glade
-rmdir ${filters} -rmdir ${plugins}
clean: clean:
-rm -f core *.pyo *.pyc *.bak *~ -rm -f core *.pyo *.pyc *.bak *~
# Add PYTHON suffix rules to make's vocabulary
.SUFFIXES: .py .pyo
# How do we properly compile a python module?
.py.pyo:
${pycomp} $<

View File

@ -1,3 +1,5 @@
include @top_srcdir@/Makefile.comm
prefix = @prefix@ prefix = @prefix@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
bindir = @bindir@ bindir = @bindir@
@ -7,10 +9,13 @@ plugins = ${datadir}/plugins
srcdir = @top_srcdir@ srcdir = @top_srcdir@
pycomp = ${srcdir}/py-compile pycomp = ${srcdir}/py-compile
@SET_MAKE@ # Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually
PYSRCS := ${wildcard *.py}
all: PYOBJS = ${PYSRCS:.py=.pyo}
${pycomp} *.py
all: ${PYOBJS}
install: install:
${INSTALL} -d ${plugins} ${INSTALL} -d ${plugins}
@ -22,3 +27,10 @@ uninstall:
clean: clean:
-rm -f core *.pyo *.pyc *.bak *~ -rm -f core *.pyo *.pyc *.bak *~
# Add PYTHON suffix rules to make's vocabulary
.SUFFIXES: .py .pyo
# How do we properly compile a python module?
.py.pyo:
${pycomp} $<