Browse Source

Change "make alls" and "make allo" to recurse into subdirectories.

* src/Makefile.in (alls-local): Renamed from alls.
(allo-local): Renamed from allo.
(SUBDIRS_TARGET_ALL): Renamed from SUBDIRS_TARGET.
(alls, allo): New rules.
(SUBDIRS_TARGET_ALLS, SUBDIRS_TARGET_ALLO): New variables.
master
Bruno Haible 17 years ago
parent
commit
4fa058c293
  1. 9
      ChangeLog
  2. 53
      src/Makefile.in

9
ChangeLog

@ -1,3 +1,12 @@
2007-02-23 Bruno Haible <bruno@clisp.org>
Change "make alls" and "make allo" to recurse into subdirectories.
* src/Makefile.in (alls-local): Renamed from alls.
(allo-local): Renamed from allo.
(SUBDIRS_TARGET_ALL): Renamed from SUBDIRS_TARGET.
(alls, allo): New rules.
(SUBDIRS_TARGET_ALLS, SUBDIRS_TARGET_ALLO): New variables.
2007-02-22 Richard B. Kreckel <kreckel@ginac.de> 2007-02-22 Richard B. Kreckel <kreckel@ginac.de>
* include/cln/integer_io.h (read_integer): Make index args uintC. * include/cln/integer_io.h (read_integer): Make index args uintC.

53
src/Makefile.in

@ -103,9 +103,25 @@ SUBDIRS := $(patsubst ${srcdir}/%/.,%,$(wildcard ${srcdir}/${SUBDIR}/*/.))
# ii_files/ is created during "make" by SGI C++. # ii_files/ is created during "make" by SGI C++.
SUBDIRS := $(filter-out old ./old private ./private CVS %/CVS RCS %/RCS SCCS %/SCCS ii_files ./ii_files,${SUBDIRS}) SUBDIRS := $(filter-out old ./old private ./private CVS %/CVS RCS %/RCS SCCS %/SCCS ii_files ./ii_files,${SUBDIRS})
SUBDIRS_TARGET := $(patsubst %,%.target,${SUBDIRS})
# Rule 'all' must be the first in the file.
all : _all_
# Recurse into subdirectories
SUBDIRS_DIRDEP := $(patsubst %,%.dirdep,${SUBDIRS}) SUBDIRS_DIRDEP := $(patsubst %,%.dirdep,${SUBDIRS})
${SUBDIRS_DIRDEP} : %.dirdep :
# Target 'all' creates all necessary files for $(SUBDIR) and its subdirectories.
SUBDIRS_TARGET_ALL := $(patsubst %,%.target_all,${SUBDIRS})
${SUBDIRS_TARGET_ALL} : %.target_all : %.dirdep
${MAKE} SUBDIR=$* all
ifeq (${SUBDIR},.) ifeq (${SUBDIR},.)
ALLFILES_CC := $(notdir $(wildcard ${srcdir}/*.cc) $(foreach subdir,${SUBDIRS}, $(wildcard ${srcdir}/${subdir}/*.cc) $(wildcard ${srcdir}/${subdir}/*/*.cc) $(wildcard ${srcdir}/${subdir}/*/*/*.cc))) ALLFILES_CC := $(notdir $(wildcard ${srcdir}/*.cc) $(foreach subdir,${SUBDIRS}, $(wildcard ${srcdir}/${subdir}/*.cc) $(wildcard ${srcdir}/${subdir}/*/*.cc) $(wildcard ${srcdir}/${subdir}/*/*/*.cc)))
ALLFILES_CC := $(filter-out %.i.cc, ${ALLFILES_CC}) ALLFILES_CC := $(filter-out %.i.cc, ${ALLFILES_CC})
@ -115,14 +131,34 @@ ALLFILES_LO := $(patsubst %.cc,%.lo,${ALLFILES_CC})
ALLASMFILES_LO := $(patsubst %.cc,%.lo,${ALLASMFILES_CC}) ALLASMFILES_LO := $(patsubst %.cc,%.lo,${ALLASMFILES_CC})
ALLOBJECTS_LO = ${ALLFILES_LO} ${ALLASMFILES_LO} ALLOBJECTS_LO = ${ALLFILES_LO} ${ALLASMFILES_LO}
all : ${OBJECTS_LO} ${SUBDIRS_TARGET} libcln.la
_all_ : allo-local ${SUBDIRS_TARGET_ALL} libcln.la
else else
all : ${OBJECTS_LO} ${SUBDIRS_TARGET}
_all_ : allo-local ${SUBDIRS_TARGET_ALL}
endif endif
alls : ${FILES_S} ${ASMFILES_S}
allo : ${FILES_LO} ${ASMFILES_LO}
# Target 'alls' creates all .s files for $(SUBDIR) and its subdirectories.
SUBDIRS_TARGET_ALLS := $(patsubst %,%.target_alls,${SUBDIRS})
${SUBDIRS_TARGET_ALLS} : %.target_alls : %.dirdep
${MAKE} SUBDIR=$* alls
alls : alls-local ${SUBDIRS_TARGET_ALLS}
alls-local : ${FILES_S} ${ASMFILES_S}
# Target 'allo' creates all .lo files for $(SUBDIR) and its subdirectories.
SUBDIRS_TARGET_ALLO := $(patsubst %,%.target_allo,${SUBDIRS})
${SUBDIRS_TARGET_ALLO} : %.target_allo : %.dirdep
${MAKE} SUBDIR=$* allo
allo : allo-local ${SUBDIRS_TARGET_ALLO}
allo-local : ${FILES_LO} ${ASMFILES_LO}
ASMFLAGS := @ASMFLAGS@ ASMFLAGS := @ASMFLAGS@
ifeq (@AS_UNDERSCORE@,true) ifeq (@AS_UNDERSCORE@,true)
@ -193,13 +229,6 @@ endif
endif endif
# Recurse into subdirectories
${SUBDIRS_TARGET} : %.target : %.dirdep
${MAKE} SUBDIR=$*
${SUBDIRS_DIRDEP} : %.dirdep :
ifeq (${SUBDIR},.) ifeq (${SUBDIR},.)
${ALLOBJECTS_LO} : ${SUBDIRS_TARGET} ${ALLOBJECTS_LO} : ${SUBDIRS_TARGET}

Loading…
Cancel
Save