- powerful dependancies generation (strolen from VLC);

  - snapshot target;
  - changelog file.
parent 530bec76
#===================#
# ChangeLog for vls #
#===================#
HEAD
* first public release
################################################################################ ################################################################################
# vls Makefile # vls (VideoLAN Server) main Makefile
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# (c)1999-2001 VideoLAN # (c)1999-2001 VideoLAN
# $Id: Makefile,v 1.60 2001/10/06 22:18:05 bozo Exp $ # $Id: Makefile,v 1.61 2001/10/07 16:45:29 bozo Exp $
################################################################################ ################################################################################
# Main Makefile to build the VideoLAN Server
ifeq ($(shell [ ! -r Makefile.opts ] && echo 1),) ifeq ($(shell [ ! -r Makefile.opts ] && echo 1),)
include Makefile.opts include Makefile.opts
endif endif
################################################################################ ################################################################################
# Common options # Common options
################################################################################ ################################################################################
...@@ -58,12 +58,6 @@ SERVERSRC= src/server/admin.cpp \ ...@@ -58,12 +58,6 @@ SERVERSRC= src/server/admin.cpp \
src/server/nativeadmin.cpp \ src/server/nativeadmin.cpp \
src/server/vls.cpp \ src/server/vls.cpp \
src/server/tsstreamer.cpp \ src/server/tsstreamer.cpp \
# server/file/fileinput.cpp \
# server/dvd/dvdinput.cpp \
# server/remote/remoteinput.cpp \
# server/satellite/satinput.cpp \
# server/vod/vod.cpp \
#
# #
...@@ -96,6 +90,15 @@ SERVERDEP:=$(SERVERSRC:src/%.cpp=dep/%.d) ...@@ -96,6 +90,15 @@ SERVERDEP:=$(SERVERSRC:src/%.cpp=dep/%.d)
DEP:=$(COREDEP) $(MPEGDEP) $(SHAREDDEP) $(SERVERDEP) $(REMOTEDEP) DEP:=$(COREDEP) $(MPEGDEP) $(SHAREDDEP) $(SERVERDEP) $(REMOTEDEP)
#
# Misc variables
#
VLS_QUICKVERSION := $(shell grep '^ *VLS_VERSION=' configure.in | cut -f2 -d=)
# export symbols for recursive Makefiles
export
################################################################################ ################################################################################
# Targets definition # Targets definition
################################################################################ ################################################################################
...@@ -103,7 +106,7 @@ DEP:=$(COREDEP) $(MPEGDEP) $(SHAREDDEP) $(SERVERDEP) $(REMOTEDEP) ...@@ -103,7 +106,7 @@ DEP:=$(COREDEP) $(MPEGDEP) $(SHAREDDEP) $(SERVERDEP) $(REMOTEDEP)
# #
# Build rules # Build rules
# #
all: $(INPUTS) vls all: Makefile.opts vls $(INPUTS)
Makefile.opts: Makefile.opts:
@echo "**** No configuration found, please run ./configure..." @echo "**** No configuration found, please run ./configure..."
...@@ -142,47 +145,43 @@ $(OBJ): obj/%.o: src/%.cpp ...@@ -142,47 +145,43 @@ $(OBJ): obj/%.o: src/%.cpp
@echo "Compiling $<..." @echo "Compiling $<..."
$(CC) $(CCFLAGS) $(INCLUDE) -o $@ -c $< $(CC) $(CCFLAGS) $(INCLUDE) -o $@ -c $<
$(DEP): Makefile.opts Makefile $(DEP): Makefile.opts Makefile FORCE
$(DEP): dep/%.d: src/%.cpp $(DEP): dep/%.d: src/%.cpp
@test -d dep/$(dir $*) || mkdir -p dep/$(dir $*) @$(MAKE) -s --no-print-directory -f Makefile.dep $@
@echo "Generating dependancies for $<..."
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(INCLUDE) $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
# FORCE:
# Dependancies inclusion
#
ifneq ($(MAKECMDGOALS), clean)
ifneq ($(MAKECMDGOALS), distclean)
-include $(DEP)
endif
endif
################################################################################
# Notes
################################################################################
# The purpose of the sed command is to make each `.d' file depend on all the
# source and header files that the corresponding `.o' file depends on. Make then
# knows it must regenerate the dependencies whenever any of the source or header
# files changes.
# Each .d file also depends on the Makefile so that make regenerate the entire
# files when the Makefile is modified
# #
# Each .o file of course depends on the corresponding source file but also on # Package generation rules
# all the headers it may include through the generated .d file which is
# included at the end of the Makefile.
# Is also depends on the corresponding .d file so that we are sure it will be
# remade each time the dependancies are updated even if the files it depends on
# have not changed. This is usefull when the Makefile is modified for example.
# #
# Dependancies files (.d) are always included. Howewer this should not be done snapshot:
# for some targets such as clean. # Check that tmp isn't in the way
# Dependencies computation can fail if a header included in another header is @if test -e tmp; then \
# modified, since the target file only depends on the directly included files. echo "Error: please remove ./tmp, it is in the way"; false; \
# This is a general problem which has no simple solution (unless a special else \
# option allow the compiler to be more smart when it generates the dep) echo "Starting snapshot's build."; mkdir tmp; \
fi
# Copy directory structure in tmp
find -type d | grep -v '\(snapshot\|CVS\)' | while read i ; \
do mkdir -p tmp/vls/$$i ; \
done
rm -Rf tmp/vls/tmp
# Copy .c .h .in .cpp and files
find src -type f -name '*.[chi]*' | while read i ; \
do cp $$i tmp/vls/$$i ; done
# Copy input Makefiles
find src/input -type f -name Makefile | while read i ; \
do cp $$i tmp/vls/$$i ; done
# Copy misc files
cp AUTHORS COPYING TODO todo.pl ChangeLog* README* INSTALL* \
Makefile Makefile.opts.in Makefile.input \
configure configure.in install-sh config.sub config.guess \
tmp/vls/
# Build archives
F=vls-${VLS_QUICKVERSION}; \
mv tmp/vls tmp/$$F; (cd tmp ; tar cf $$F.tar $$F); \
bzip2 -f -9 < tmp/$$F.tar > $$F.tar.bz2; \
gzip -f -9 tmp/$$F.tar ; mv tmp/$$F.tar.gz .
# Clean up
rm -Rf tmp
################################################################################
# vls (VideoLAN Server) dependencies Makefile
#-------------------------------------------------------------------------------
# (c)1999-2001 VideoLAN
# $Id: Makefile.dep,v 1.1 2001/10/07 16:45:29 bozo Exp $
################################################################################
################################################################################
# Note on generic rules and dependencies
################################################################################
#
# Note on dependencies: each .cpp file is associated with a .d file, which
# depends of it. The .o file associated with a .cpp file depends of the .d, of
# the .cpp itself, and of Makefile. The .d files are stored in a separate dep/
# directory.
# The dep directory should be ignored by CVS.
#
# Note on inclusions: depending of the target, the dependencies files must
# or must not be included. The problem is that if we ask make to include a file,
# and this file does not exist, it is made before it can be included. In a
# general way, a .d file should be included if and only if the corresponding .o
# needs to be re-made.
#
# The object Makefile knows how to make a .o from a .cpp, and includes
# dependencies for the target, but only those required.
#
# All settings and options are passed through main Makefile
################################################################################
# Default target
################################################################################
default:
@echo "This Makefile should not be called directly,"
################################################################################
# Dependencies creation
################################################################################
# A dependencies file needs to be rebuilt if the .cpp changed or if one of the
# dependencies files have been changed. In other words, it depends from the
# .cpp and from itself.
-include $(MAKECMDGOALS)
$(DEP): dep/%.d: src/%.cpp
@test -d dep/$(dir $*) || mkdir -p dep/$(dir $*)
@echo "Generating dependancies for $<..."
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(INCLUDE) $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/src\/$(subst /,\/,$*).o \
dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
################################################################################ ################################################################################
# vls Makefile.input # vls (VideoLAN Server) input Makefile
# (c)1999-2001 VideoLAN # (c)1999-2001 VideoLAN
################################################################################ ################################################################################
# Makefile skeleton for inputs building # Makefile skeleton for inputs building
# The Makefile which includes this file at the end must define at least # The Makefile which includes this file at the end must define at least
# - INPUT which is the name of the input; # - INPUT which is the name of the input;
...@@ -23,6 +24,17 @@ OBJ:=$(SRC:%.cpp=obj/%.o) ...@@ -23,6 +24,17 @@ OBJ:=$(SRC:%.cpp=obj/%.o)
# #
DEP:=$(SRC:%.cpp=dep/%.d) DEP:=$(SRC:%.cpp=dep/%.d)
# export symbols for recursive Makefiles
export
################################################################################
# Default target
################################################################################
default:
@echo "This Makefile should not be called directly,"
################################################################################ ################################################################################
# Targets definition # Targets definition
...@@ -53,27 +65,10 @@ $(OBJ): obj/%.o: %.cpp ...@@ -53,27 +65,10 @@ $(OBJ): obj/%.o: %.cpp
@echo "Compiling $<..." @echo "Compiling $<..."
$(CC) $(CCFLAGS) $(INCLUDE) -fPIC -o $@ -c $< $(CC) $(CCFLAGS) $(INCLUDE) -fPIC -o $@ -c $<
$(DEP): Makefile $(DEP): ../../../Makefile.input FORCE
$(DEP): dep/%.d: %.cpp $(DEP): dep/%.d: %.cpp
@test -d dep/$(dir $*) || mkdir -p dep/$(dir $*) @$(MAKE) -s --no-print-directory -f \
@echo "Generating dependancies for $<..." ../../../Makefile.input.dep $@
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(INCLUDE) $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
#
# Dependancies inclusion
#
ifneq ($(MAKECMDGOALS), clean)
ifneq ($(MAKECMDGOALS), distclean)
-include $(DEP)
endif
endif
################################################################################
# Notes
################################################################################
# Look at the main Makefile for more information. FORCE:
################################################################################
# vls (VideoLAN Server) input's dependencies makefile
#-------------------------------------------------------------------------------
# (c)1999-2001 VideoLAN
# $Id: Makefile.input.dep,v 1.1 2001/10/07 16:45:29 bozo Exp $
################################################################################
###############################################################################
# Note on generic rules and dependencies
###############################################################################
# Note on dependencies: each .cpp file is associated with a .d file, which
# depends of it. The .o file associated with a .cpp file depends of the .d, of
# the .cpp itself, and of Makefile. The .d files are stored in a separate dep/
# directory.
# The dep directory should be ignored by CVS.
# Note on inclusions: depending of the target, the dependencies files must
# or must not be included. The problem is that if we ask make to include a file,
# and this file does not exist, it is made before it can be included. In a
# general way, a .d file should be included if and only if the corresponding .o
# needs to be re-made.
# The object Makefile knows how to make a .o from a .cpp, and includes
# dependencies for the target, but only those required.
# All settings and options are passed through main Makefile
################################################################################
# Default target
################################################################################
default:
@echo "This Makefile should not be called directly,"
################################################################################
# Dependencies creation
################################################################################
# A dependencies file needs to be rebuilt if the .c changed or if one of the
# dependencies files have been changed. In other words, it depends from the
# .c and from itself.
-include $(MAKECMDGOALS)
$(DEP): dep/%.d: %.cpp
@test -d dep/$(dir $*) || mkdir -p dep/$(dir $*)
@echo "Generating dependancies for $<..."
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(INCLUDE) $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
[ -s $@ ] || rm -f $@'
#! /usr/bin/perl
$buffer = "";
$description = "";
open FILE, "TODO";
while (<FILE>) {
$buffer .= $_;
if (/^Status:/) {
if(/Todo/) {
print $buffer;
} else {
print "\n".$description;
print $_;
}
$buffer = "";
$description = "";
} elsif (/^Description/) {
$description = $_;
}
}
close FILE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment