-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (59 loc) · 3.62 KB
/
Copy pathMakefile
File metadata and controls
72 lines (59 loc) · 3.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Make sure that user sets SERIES
# There are much better ways to do this, but
# we may not have GNU Make on AIX so
# just force the check for every rule...=(
PYTHONSHORTNAME = lumosapi-client
PYTHONSHORTPACKAGENAME = python-$(PYTHONSHORTNAME)
PYTHONVERSION := $(shell cat PYTHONVERSION)
MODULEVERSION := $(shell cat MODULEVERSION)
MODULERELEASE := $(shell cat MODULERELEASE)
PACKAGENAME = slapi
PACKAGEVERSION := $(shell cat VERSION)
PACKAGERELEASE := $(shell cat RELEASE)
GENERATORVERSION := $(shell cat GENERATORVERSION)
GENERATORURL := https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/$(GENERATORVERSION)/openapi-generator-cli-$(GENERATORVERSION).jar
BUILDSOURCE = --buildsource
URL = git@github.com:LLNL/$(PACKAGENAME).git
JAVA_HOME ?= /etc/alternatives/jre_21
PATH := $(JAVA_HOME)/bin:$(PATH)
all: $(PACKAGENAME)
.openapi-generator-cli:
curl --silent --show-error --fail -L $(GENERATORURL) -o ./lib/lumosapi-client/generator/openapi-generator-cli-$(GENERATORVERSION).jar
touch .openapi-generator-cli
.quilt-lumosapi-client: .openapi-generator-cli
java -DmaxYamlCodePoints=99999999 -jar ./lib/lumosapi-client/generator/openapi-generator-cli-$(GENERATORVERSION).jar generate --skip-validate-spec -i ./lib/lumosapi-client/api/lumos.spec --inline-schema-options REFACTOR_ALLOF_INLINE_SCHEMAS=true --additional-properties=useOneOfDiscriminatorLookup=true --additional-properties=disallowAdditionalPropertiesIfNotPresent=false --additional-properties=lazyImports=true -g python -o src/lumosapi_client -p packageName=lumosapi_client -p packageVersion=$(MODULEVERSION)
./scripts/quilt-lumosapi.pl
$(PACKAGENAME): .quilt-lumosapi-client
cd src && \
./autogen.sh && \
./configure --prefix=/usr PYTHON=python$(PYTHONVERSION) && \
make -s
.PHONY:
cscope: .PHONY
rm -f cscope.*
find ${PWD}/src -name .pc -prune -o -name '*.[chxsS]' -print > cscope.files
cscope -b -u -k -R
tag: .PHONY
@echo Tagging this as $(PACKAGENAME)-$(PACKAGEVERSION)-$(PACKAGERELEASE)
git tag -a $(PACKAGENAME)-$(PACKAGEVERSION)-$(PACKAGERELEASE) -m "Tagging this as $(PACKAGENAME)-$(PACKAGEVERSION)-$(PACKAGERELEASE)"
@echo To push your new tag to GitHub run:
@echo git push origin $(PACKAGENAME)-$(PACKAGEVERSION)-$(PACKAGERELEASE)
tag-client: .PHONY
@echo Tagging this as python$(PYTHONVERSION)-$(PYTHONSHORTNAME)-$(MODULEVERSION)-$(MODULERELEASE)
git tag -a python$(PYTHONVERSION)-$(PYTHONSHORTNAME)-$(MODULEVERSION)-$(MODULERELEASE) -m "Tagging this as python$(PYTHONVERSION)-$(PYTHONSHORTNAME)-$(MODULEVERSION)-$(MODULERELEASE)"
@echo To push your new tag to GitHub run:
@echo git push origin python$(PYTHONVERSION)-$(PYTHONSHORTNAME)-$(MODULEVERSION)-$(MODULERELEASE)
tags: .PHONY
ctags -R --exclude=.pc --exclude=.svn src
rpms-client-release:
./scripts/build-python-rpm.pl --name $(PYTHONSHORTPACKAGENAME) --pythonversion $(PYTHONVERSION) $(BUILDSOURCE) --scmtype git --scmurl $(URL)
rpms-release:
./scripts/build-rpm.pl --name $(PACKAGENAME) --pythonversion $(PYTHONVERSION) $(BUILDSOURCE) --scmtype git --scmurl $(URL)
rpms-client: .quilt-lumosapi-client
./scripts/build-python-rpm.pl --name $(PYTHONSHORTPACKAGENAME) --pythonversion $(PYTHONVERSION) $(BUILDSOURCE) --snapshot -s . -f specs/$(PYTHONSHORTPACKAGENAME).spec
rpms: $(PACKAGENAME)
./scripts/build-rpm.pl --name $(PACKAGENAME) --pythonversion $(PYTHONVERSION) $(BUILDSOURCE) --snapshot -s . -f specs/$(PACKAGENAME).spec
clean:
rm -rf .quilt* .openapi-generator-cli tags cscope.*
rm -rf ./lib/lumosapi-client/generator/openapi-generator-cli*.jar
cd src && ./autoclean.sh