<commit_before># 14.12.2004, c
# last revision: 24.11.2008
VERSION := 2008.4
PROJECTNAME := sfepy

############### Edit here. #######################################

C++         := gcc
CC          := gcc
SWIG        := swig
DATE        := date +%Y_%m_%d

CARCHFLAGS   := -Wall -c
CARCHOUT     := -o

################ Do not edit below! ##############################

#  OPTFLAGS     := -g -pg -fPIC -DPIC
OPTFLAGS     := $(shell script/config.py opt_flags)
#DEBUG_FLAGS := -DDEBUG_FMF -DDEBUG_MESH
DEBUG_FLAGS := $(shell script/config.py debug_flags)
#DEBUG_FLAGS :=
PYVER := $(shell script/config.py python_version)
ARCHLIB := $(shell script/config.py archlib)
NUMPYINCLUDE := $(shell script/config.py numpy_include)

PYTHON_INCL  := -I/usr/include/python$(PYVER) -I$(NUMPYINCLUDE)
#  SWIG_LIB     := -lswigpy

EXT_INCL     := $(PYTHON_INCL)

###############

ISRELEASE :=
ISFULL :=
MODULES := eldesc examples input sfepy sfepy/applications sfepy/base sfepy/fem sfepy/fem/extmods sfepy/homogenization sfepy/mechanics sfepy/solvers sfepy/terms sfepy/terms/extmods sfepy/physics sfepy/physics/extmods tests
ifdef ISFULL
  MODULES += sfepy/optimize
endif
VERSIONH := sfepy/fem/extmods/version.h
ALLTARGETS := version modules

CUR_DIR := $(shell pwd)

DISTFILES_TOP := btrace_python Makefile DIARY VERSION findSurf.py init_sfepy.py shaper.py test.mesh gen genhtml genDocs.py genPerMesh.py homogen.py extractor.py plotPerfusionCoefs.py runTests.py simple.py schroedinger.py eigen.py site_cfg_template.py TODO INSTALL README LICENSE
RELDISTFILES_TOP := btrace_python Makefile VERSION init_sfepy.py extractor.py findSurf.py gen genhtml genDocs.py genPerMesh.py runTests.py simple.py schroedinger.py eigen.py site_cfg_template.py convert.py INSTALL LICENSE README RELEASE_NOTES.txt
SUBDIRS = database doc eldesc examples input script sfepy tests
RELSUBDIRS = database doc eldesc examples input script sfepy tests geom
DATADIRS := database
DATADISTDIR := $(PROJECTNAME)-data-$(shell $(DATE))
DISTDIR := $(PROJECTNAME)-$(VERSION)
RELDISTDIR := $(PROJECTNAME)-release-$(VERSION)
BKUPDIR = 00backup-$(notdir $(PROJECTNAME))

####### Default rule

all:	$(ALLTARGETS)
	echo $(DATADIR)
	@echo All done.

##################################################################

INCL         :=
SRCPYFILES   := 
SRCCFILES    :=
HDRCFILES    :=
CLEANFILES   :=
SRC_LIBSWIG  :=

# include the description for each module
include $(patsubst %,%/Makefile.inc,$(MODULES))
INCL += $(patsubst %,-I%,$(MODULES))

CFLAGS := $(OPTFLAGS) -D__SDIR__='"${LOCDIR}"' ${DEBUG_FLAGS} ${INCL} ${EXT_INCL} $(CARCHFLAGS)

ifndef ISFULL
  CFLAGS += -DISRELEASE
  SWIGFLAGS := -DISRELEASE
endif

####### Implicit rules

%_wrap.c: %.i
#	$(SWIG) -noruntime -python $(INCL)  ${EXT_INCL} -o $@ $<
	$(SWIG) -python $(INCL)  ${EXT_INCL} $(SWIGFLAGS) -o $@ $<

%_wrap.o: %_wrap.c
	$(CC) $(CFLAGS) $< $(CARCHOUT) $@

%.o : %.c
	$(CC) $(CFLAGS) $< $(CARCHOUT) $@

####### Build rules

.PHONY : tags version dist reldist htmldocs save backup clean

modules: sfepy/fem/extmods/version.h $(SRC_LIBSWIG)
	@echo Python modules done.
	@echo ""

#$(SRC_LIBSWIG): $(SRC_OBJSWIG) $(SRC_OBJC)
#	@echo $(SRC_SRCSWIG)
#	@echo $(SRC_OBJSWIGC)
#	@echo $(SRC_OBJSWIG)
#	@echo $(SRC_OBJSWIGPY)
#	@echo $(SRC_LIBSWIG)
#	@echo $(SRC_OBJC)
#	$(CC) -shared -fPIC -DPIC $< $(SRC_OBJC) $(SWIG_LIB) -o $@
#
$(VERSIONH) : Makefile
	sed "s|^\(#define VERSION\) \".*\"|\1 \"$(shell cat VERSION)\"|;" $(VERSIONH).in > $(VERSIONH)

clean:
	-rm -f *.o *.bak *~ *% *tgz #*
	-rm -f $(CLEANFILES)

tags: clear_tags c_tags python_tags

clear_tags:
	-rm -f TAGS

c_tags:
	-etags -a $(SRCCFILES) $(HDRCFILES)

python_tags:
	-etags -a $(SRCPYFILES)

version:
ifdef ISRELEASE
	@echo $(VERSION)-release > 'VERSION'
else
	@echo $(VERSION)-$(shell hg identify -i) > 'VERSION'
endif

dist: version
	-mkdir $(DISTDIR)
	rm -rf $(DISTDIR)/*
	for i in $(DISTFILES_TOP); do cp -fpd $$i $(DISTDIR)/$$i; done
	@for i in $(SUBDIRS); do \
          $(MAKE) -C $$i -f Makefile.dist dist DISTDIR=${CUR_DIR}/$(DISTDIR); \
	done
	tar cf $(DISTDIR).tar $(DISTDIR)
	gzip -f --best $(DISTDIR).tar
	mv $(DISTDIR).tar.gz $(DISTDIR).tgz
	rm -rf $(DISTDIR)

reldist: version
	-./gen
	-mkdir $(RELDISTDIR)
	rm -rf $(RELDISTDIR)/*
	for i in $(RELDISTFILES_TOP); do cp -fpd $$i $(RELDISTDIR)/$$i; done
	@for i in $(RELSUBDIRS); do \
          $(MAKE) -C $$i -f Makefile.dist reldist DISTDIR=${CUR_DIR}/$(RELDISTDIR); \
	done
	mkdir $(RELDISTDIR)/output-tests
	mkdir $(RELDISTDIR)/tmp
	sed "s|ISRELEASE \:\=|ISRELEASE \:\= 1|;" $(RELDISTDIR)/Makefile > $(RELDISTDIR)/Makefile2
	mv -f $(RELDISTDIR)/Makefile2 $(RELDISTDIR)/Makefile
	tar cf $(RELDISTDIR).tar $(RELDISTDIR)<commit_msg>fixed repository version for git<commit_after># 14.12.2004, c
# last revision: 24.11.2008
VERSION := 2008.4
PROJECTNAME := sfepy

############### Edit here. #######################################

C++         := gcc
CC          := gcc
SWIG        := swig
DATE        := date +%Y_%m_%d

CARCHFLAGS   := -Wall -c
CARCHOUT     := -o

################ Do not edit below! ##############################

#  OPTFLAGS     := -g -pg -fPIC -DPIC
OPTFLAGS     := $(shell script/config.py opt_flags)
#DEBUG_FLAGS := -DDEBUG_FMF -DDEBUG_MESH
DEBUG_FLAGS := $(shell script/config.py debug_flags)
#DEBUG_FLAGS :=
PYVER := $(shell script/config.py python_version)
ARCHLIB := $(shell script/config.py archlib)
NUMPYINCLUDE := $(shell script/config.py numpy_include)

PYTHON_INCL  := -I/usr/include/python$(PYVER) -I$(NUMPYINCLUDE)
#  SWIG_LIB     := -lswigpy

EXT_INCL     := $(PYTHON_INCL)

###############

ISRELEASE :=
ISFULL :=
MODULES := eldesc examples input sfepy sfepy/applications sfepy/base sfepy/fem sfepy/fem/extmods sfepy/homogenization sfepy/mechanics sfepy/solvers sfepy/terms sfepy/terms/extmods sfepy/physics sfepy/physics/extmods tests
ifdef ISFULL
  MODULES += sfepy/optimize
endif
VERSIONH := sfepy/fem/extmods/version.h
ALLTARGETS := version modules

CUR_DIR := $(shell pwd)

DISTFILES_TOP := btrace_python Makefile DIARY VERSION findSurf.py init_sfepy.py shaper.py test.mesh gen genhtml genDocs.py genPerMesh.py homogen.py extractor.py plotPerfusionCoefs.py runTests.py simple.py schroedinger.py eigen.py site_cfg_template.py TODO INSTALL README LICENSE
RELDISTFILES_TOP := btrace_python Makefile VERSION init_sfepy.py extractor.py findSurf.py gen genhtml genDocs.py genPerMesh.py runTests.py simple.py schroedinger.py eigen.py site_cfg_template.py convert.py INSTALL LICENSE README RELEASE_NOTES.txt
SUBDIRS = database doc eldesc examples input script sfepy tests
RELSUBDIRS = database doc eldesc examples input script sfepy tests geom
DATADIRS := database
DATADISTDIR := $(PROJECTNAME)-data-$(shell $(DATE))
DISTDIR := $(PROJECTNAME)-$(VERSION)
RELDISTDIR := $(PROJECTNAME)-release-$(VERSION)
BKUPDIR = 00backup-$(notdir $(PROJECTNAME))

####### Default rule

all:	$(ALLTARGETS)
	echo $(DATADIR)
	@echo All done.

##################################################################

INCL         :=
SRCPYFILES   := 
SRCCFILES    :=
HDRCFILES    :=
CLEANFILES   :=
SRC_LIBSWIG  :=

# include the description for each module
include $(patsubst %,%/Makefile.inc,$(MODULES))
INCL += $(patsubst %,-I%,$(MODULES))

CFLAGS := $(OPTFLAGS) -D__SDIR__='"${LOCDIR}"' ${DEBUG_FLAGS} ${INCL} ${EXT_INCL} $(CARCHFLAGS)

ifndef ISFULL
  CFLAGS += -DISRELEASE
  SWIGFLAGS := -DISRELEASE
endif

####### Implicit rules

%_wrap.c: %.i
#	$(SWIG) -noruntime -python $(INCL)  ${EXT_INCL} -o $@ $<
	$(SWIG) -python $(INCL)  ${EXT_INCL} $(SWIGFLAGS) -o $@ $<

%_wrap.o: %_wrap.c
	$(CC) $(CFLAGS) $< $(CARCHOUT) $@

%.o : %.c
	$(CC) $(CFLAGS) $< $(CARCHOUT) $@

####### Build rules

.PHONY : tags version dist reldist htmldocs save backup clean

modules: sfepy/fem/extmods/version.h $(SRC_LIBSWIG)
	@echo Python modules done.
	@echo ""

#$(SRC_LIBSWIG): $(SRC_OBJSWIG) $(SRC_OBJC)
#	@echo $(SRC_SRCSWIG)
#	@echo $(SRC_OBJSWIGC)
#	@echo $(SRC_OBJSWIG)
#	@echo $(SRC_OBJSWIGPY)
#	@echo $(SRC_LIBSWIG)
#	@echo $(SRC_OBJC)
#	$(CC) -shared -fPIC -DPIC $< $(SRC_OBJC) $(SWIG_LIB) -o $@
#
$(VERSIONH) : Makefile
	sed "s|^\(#define VERSION\) \".*\"|\1 \"$(shell cat VERSION)\"|;" $(VERSIONH).in > $(VERSIONH)

clean:
	-rm -f *.o *.bak *~ *% *tgz #*
	-rm -f $(CLEANFILES)

tags: clear_tags c_tags python_tags

clear_tags:
	-rm -f TAGS

c_tags:
	-etags -a $(SRCCFILES) $(HDRCFILES)

python_tags:
	-etags -a $(SRCPYFILES)

version:
ifdef ISRELEASE
	@echo $(VERSION)-release > 'VERSION'
else
	@echo $(VERSION)-git-$(shell git log --pretty=format:'%h'  HEAD~1..HEAD) > 'VERSION'
endif

dist: version
	-mkdir $(DISTDIR)
	rm -rf $(DISTDIR)/*
	for i in $(DISTFILES_TOP); do cp -fpd $$i $(DISTDIR)/$$i; done
	@for i in $(SUBDIRS); do \
          $(MAKE) -C $$i -f Makefile.dist dist DISTDIR=${CUR_DIR}/$(DISTDIR); \
	done
	tar cf $(DISTDIR).tar $(DISTDIR)
	gzip -f --best $(DISTDIR).tar
	mv $(DISTDIR).tar.gz $(DISTDIR).tgz
	rm -rf $(DISTDIR)

reldist: version
	-./gen
	-mkdir $(RELDISTDIR)
	rm -rf $(RELDISTDIR)/*
	for i in $(RELDISTFILES_TOP); do cp -fpd $$i $(RELDISTDIR)/$$i; done
	@for i in $(RELSUBDIRS); do \
          $(MAKE) -C $$i -f Makefile.dist reldist DISTDIR=${CUR_DIR}/$(RELDISTDIR); \
	done
	mkdir $(RELDISTDIR)/output-tests
	mkdir $(RELDISTDIR)/tmp
	sed "s|ISRELEASE \:\=|ISRELEASE \:\= 1|;" $(RELDISTDIR)/Makefile > $(RELDISTDIR)/Makefile2
	mv -f $(RELDISTDIR)/Makefile2 $(RELDISTDIR)/Makefile
	tar cf $(RELDISTDIR).tar $(RELDISTDIR)
{'fraction_non_alphanumeric': 0.19840170484816197, 'fraction_numerical': 0.005860415556739478, 'mean_word_length': 4.342060330108139, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '428781', 'n_tokens_mistral': 3792, 'n_tokens_neox': 3618, 'n_words': 858}