2011-03-05 11:00:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								###########
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# LICENCE #
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								###########
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Copyright (C) 2011 DOSSMANN Olivier <olivier@dossmann.net> ##
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  This file is part of PorteAil.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  PorteAil is free software: you can redistribute it and/or modify
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  it under the terms of the GNU General Public License as published by
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  the Free Software Foundation, either version 3 of the License, or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  (at your option) any later version.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  PorteAil is distributed in the hope that it will be useful,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  but WITHOUT ANY WARRANTY; without even the implied warranty of
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  GNU General Public License for more details.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  You should have received a copy of the GNU General Public License
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#  along with PorteAil. If not, see <http://www.gnu.org/licenses/>.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								######################################################################
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# définition de cibles particulières
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								.PHONY: clean
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 16:39:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								## VARIABLES ##
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 16:02:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								## CONFIG PAR DEFAUT
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 10:49:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include configrc.exemple
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 16:02:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								## CONFIG UTILISATEUR
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-09 15:38:05 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								include configrc
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 16:02:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								## AUTRES CONFIGS
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##--[[ adresses ]]--##
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								INTRO_ADDR = $(COMPOSANTS)/$(INTRO)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								INDEX_ADDR = $(CIBLE)/$(INDEX)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								MENU_ADDR = $(COMPOSANTS)/$(MENU)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CSS_SANS_MENU_ADDR = $(CSS)/$(CSS_SANS_MENU)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CSS_AVEC_MENU_ADDR = $(CSS)/$(CSS_AVEC_MENU)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								STYLE_ADDR = $(CSS)/$(STYLE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENTETE_ADDR = $(COMPOSANTS)/$(ENTETE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENQUEUE_ADDR = $(COMPOSANTS)/$(ENQUEUE)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								POST_CONTENU_ADDR = $(COMPOSANTS)/$(POST_CONTENU)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENTETE_CAT_ADDR = $(COMPOSANTS)/$(ENTETE_CAT)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ENQUEUE_CAT_ADDR = $(COMPOSANTS)/$(ENQUEUE_CAT)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ELEMENT_ADDR = $(COMPOSANTS)/$(ELEMENT)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								CONTENU_ADDR = $(COMPOSANTS)/$(CONTENU)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								DEFAUT_IMG_ADDR = $(IMAGES)/$(DEFAUT_IMG)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								##--[[ dépendances ]]--##
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ifndef $(MENU)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CSS_DEP = $(CSS_SANS_MENU_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								else
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									CSS_DEP = $(CSS_AVEC_MENU_ADDR) 
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								INDEX_DEP = $(ENTETE_ADDR) $(ENQUEUE_ADDR) $(POST_CONTENU_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 16:02:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# Éléments sources
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:58:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								SOURCE = $(CATEGORIES)/*.$(CATEGORIES_EXT)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 16:02:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# programmes
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 12:00:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_ECHO = `which echo`
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_TEST = `which test`
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								PROG_SED  = `which sed`
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								PROG_CAT = `which cat`
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:40:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_CP = `which cp`
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-09 17:54:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_SH = `which sh`
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-29 12:47:39 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_RM = `which rm`
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-15 11:29:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_FIND = `which find`
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 18:00:25 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_SORT = `which sort`
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-15 11:29:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PROG_WC = `which wc`
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 11:40:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# vérification des programmes
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_ECHO
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_echo = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_TEST
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_test = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_SED
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_sed = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_CAT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_cat = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_CP
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_cp = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_SH
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_sh = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_RM
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_rm = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-15 11:29:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_FIND
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_find = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 18:00:25 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_SORT
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_sort = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-15 11:29:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ifndef PROG_WC
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								error_wc = 1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								endif
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 11:40:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 16:39:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								## DEBUT
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# création de tous les fichiers
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-16 12:58:00 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								all: test index
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# divers tests sur l'existence des dossiers/fichiers
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# création si besoin
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-10 20:31:03 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								test:
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 11:40:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(error_echo), exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 12:00:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "Lancement des tests…"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 11:40:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…existence des différents programmes"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(if $(error_test), @$(PROG_ECHO) -e "\t\ttest : MANQUANT." ; exit 1)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(if $(error_sed), @$(PROG_ECHO) -e "\t\tsed : MANQUANT." ; exit 1)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(if $(error_cat), @$(PROG_ECHO) -e "\t\tcat : MANQUANT." ; exit 1)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(if $(error_cp), @$(PROG_ECHO) -e "\t\tcp : MANQUANT." ; exit 1)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(if $(error_sh), @$(PROG_ECHO) -e "\t\tsh : MANQUANT." ; exit 1)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									$(if $(error_rm), @$(PROG_ECHO) -e "\t\trm : MANQUANT." ; exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-15 11:29:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(error_find), @$(PROG_ECHO) -e "\t\tfind : MANQUANT." ; exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 18:00:25 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(error_sort), @$(PROG_ECHO) -e "\t\tsort : MANQUANT." ; exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-15 11:29:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(error_wc), @$(PROG_ECHO) -e "\t\twc : MANQUANT." ; exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…existence des dossiers '$(IMAGES)', '$(CATEGORIES)' et '$(CSS)'"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:13:09 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_TEST) -d $(IMAGES) || mkdir $(IMAGES)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_TEST) -d $(CATEGORIES) || mkdir $(CATEGORIES)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_TEST) -d $(CSS) || mkdir $(CSS)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:40:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…option introduction dans la page"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(INTRO), @$(PROG_TEST) -f $(INTRO_ADDR) || exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:40:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(INTRO), @$(PROG_ECHO) -e "\t\t-> activée", @$(PROG_ECHO) -e "\t\t-> désactivée")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…option ajout d'un menu (vérification de l'existence)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:58:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(MENU), @$(PROG_TEST) -f $(MENU_ADDR) || exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:40:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(MENU), @$(PROG_ECHO) -e "\t\t-> activée", @$(PROG_ECHO) -e "\t\t-> désactivée")
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-05 15:35:45 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…création de la destination"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_TEST) -d $(CIBLE) || mkdir $(CIBLE)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:13:09 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…création du dossier '$(IMAGES_CIBLE)'"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_TEST) -d $(CIBLE)/$(IMAGES_CIBLE) || mkdir $(CIBLE)/$(IMAGES_CIBLE)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "  …terminé."
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 14:18:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# création du fichier CSS
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$(CIBLE)/$(CSS_NOM): $(CSS_DEP)
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 14:18:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "Création du fichier CSS…"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(MENU), @$(PROG_CP) $(CSS_AVEC_MENU_ADDR) $(CIBLE)/$(CSS_NOM), @$(PROG_CP) $(CSS_SANS_MENU_ADDR) $(CIBLE)/$(CSS_NOM))
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "  …terminée."
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 14:18:57 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-19 00:11:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# création du fichier CSS de couleur
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$(CIBLE)/$(STYLE): $(STYLE_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-19 00:11:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "Création du fichier CSS pour les couleurs…"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 11:14:44 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_CP) $(STYLE_ADDR) $(CIBLE)/$(STYLE)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-19 00:11:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "  …terminée."
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# création du fichier $(CONTENU_ADDR)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								$(CONTENU_ADDR): $(GEN_CATEGORIES) $(SOURCE) $(DEFAUT_IMG_ADDR)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_SED) -i "s/DEBUG=1/DEBUG=0/g" $(GEN_CATEGORIES)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-13 11:57:37 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "Création du contenu avec les valeurs suivantes : "
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Dossier catégorie : $(CATEGORIES)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Destination temporaire du contenu : $(CONTENU_ADDR)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:58:19 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Extension des fichiers à lire : $(CATEGORIES_EXT)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:13:09 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Dossier ayant les composants de la page : $(COMPOSANTS)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Entête HTML d'une catégorie : $(ENTETE_CAT_ADDR)"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Enqueue HTML d'une catégorie : $(ENQUEUE_ADDR)"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Code HTML d'un élément : $(ELEMENT_ADDR)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 17:13:09 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Dossier contenant les images sources : $(IMAGES)"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Dossier de destination des images : $(IMAGES_CIBLE)"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Image par défaut : $(DEFAUT_IMG_ADDR)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t\t- Dossier de destination global : $(CIBLE)"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_SH) $(GEN_CATEGORIES) $(CATEGORIES) $(CONTENU_ADDR) $(CATEGORIES_EXT) $(COMPOSANTS) $(ENTETE_CAT_ADDR) $(ENQUEUE_CAT_ADDR) $(ELEMENT_ADDR) $(IMAGES) $(IMAGES_CIBLE) $(DEFAUT_IMG_ADDR) $(CIBLE)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-05 11:28:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# création de la page d'index
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 17:17:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								index: $(INDEX_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								$(INDEX_ADDR): $(COMPOSANTS) $(CIBLE)/$(CSS_NOM) $(INDEX_DEP) $(CONTENU_ADDR) $(CIBLE)/$(STYLE)
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 12:00:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "Création de la page de garde…"
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# entete
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…insertion de l'entête"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_CAT) $(ENTETE_ADDR) > $(INDEX_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# modification du contenu
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…modification du contenu"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-16 12:58:00 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_SED) -i \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										-e "s/@@TITRE_PORTEAIL@@/$(TITRE)/g"       \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										-e "s/@@ACCUEIL_PORTEAIL@@/$(ACCUEIL)/g"   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										-e "s#@@CSS_DEFAUT@@#./$(CSS_NOM)#g"       \
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 15:36:58 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										-e "s#@@CSS_COULEUR@@#./$(STYLE)#g"  \
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-16 12:58:00 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										-e "s/^\(.*\)@@.*@@\(.*\)$$/\1\2/g"        \
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 17:17:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										$(INDEX_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t  …contenu modifié avec succès !"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# introduction (SI la variable INTRO est remplie)
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 17:17:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(INTRO), @cat $(INTRO_ADDR) >> $(INDEX_ADDR); $(PROG_ECHO) -e "\t…insertion de l'introduction" || exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# contenu
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-05 11:28:13 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…insertion du contenu"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_CAT) $(CONTENU_ADDR) >> $(INDEX_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 20:06:35 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#	fin du contenu
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…insertion de la fin du contenu"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_CAT) $(POST_CONTENU_ADDR) >> $(INDEX_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# menu
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-21 17:17:31 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									$(if $(MENU), @cat $(MENU_ADDR) >> $(INDEX_ADDR); $(PROG_ECHO) -e "\t…insertion du menu" || exit 1)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# enqueue
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "\t…insertion de l'enqueue"
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_CAT) $(ENQUEUE_ADDR) >> $(INDEX_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "  …terminée."
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-23 22:42:16 +01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# nettoyage des fichiers générés
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								clean:
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-28 12:00:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "Nettoyage des fichiers en cours…"
							 | 
						
					
						
							
								
									
										
										
										
											2012-02-20 16:42:29 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_RM) -rf $(CIBLE)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-02 11:34:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_RM) -f $(CONTENU_ADDR)
							 | 
						
					
						
							
								
									
										
										
										
											2011-03-04 19:08:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@$(PROG_ECHO) -e "  …terminé."
							 |