# # Copyright (c) 1997, 1999 The University of Utah and # the Computer Systems Laboratory at the University of Utah (CSL). # # This file is part of Flick, the Flexible IDL Compiler Kit. # # Flick 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 2 of the License, or # (at your option) any later version. # # Flick 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 Flick; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place #330, Boston, MA 02111, USA. # ifndef _flick_makerules_include_ _flick_makerules_include_ = yes # Save `SECTIONS'; the generic `GNUmakerules' file adds architecture- and # OS-dependent directories to the list. We need the original `SECTIONS', # however, in order to drive the installation process. # SIMPLE_SECTIONS := $(SECTIONS) # We principally install header files from the Flick source tree, but some # headers may be generated by the configuration or build process. So we add # the object directories to `SRCDIRS', so that those generated header files # will be included in `HFILES'. # SRCDIRS += $(addprefix $(OBJDIR)/,$(SECTIONS)) ## .PHONY: all all: include $(SRCDIR)/GNUmakerules ## HFILES := $(filter %.h,$(FILES)) SCMLFILES := $(filter %.scml,$(FILES)) # Installation of the include files is performed section-by-section. This # technique allows us to get a handle on each section name and translate it # into the name of an installation directory. # # This Makefile would be a lot simpler if we assumed that there was only one # section name in `SIMPLE_SECTIONS'. .PHONY: install $(SIMPLE_SECTIONS) install: $(SIMPLE_SECTIONS) $(SIMPLE_SECTIONS): $(MKDIR) $(patsubst runtime/headers/%, $(INSTALL_INCDIR)/%,$@) $(INSTALL_DATA) $(filter $(SRCDIR)/$@/%,$(HFILES)) \ $(filter $(OBJDIR)/$@/%,$(HFILES)) \ $(filter $(SRCDIR)/$@/%,$(SCMLFILES)) \ $(patsubst runtime/headers/%, $(INSTALL_INCDIR)/%,$@) # XXX --- The $(INSTALL_DATA) command above will fail if the section doesn't # contain any `.h' or `.scml' files. endif ## End of file.