Permalink
Browse files

Fixes EUCA-3902. Added make indent.

  • Loading branch information...
1 parent 320b675 commit 6105183574ee997ccae3048cc3424c5bac714288 @gelinasc gelinasc committed Nov 26, 2012
View
@@ -14,6 +14,15 @@ SUBDIRS = tools \
cluster \
clc
+INDENTDIRS = cluster \
+ util \
+ net \
+ storage \
+ gatherlog \
+ node \
+ cluster \
+ clc
+
.PHONY: all clean distclean build
all: build
@@ -63,6 +72,10 @@ uninstall:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit $$? ; done
+indent:
+ @for subdir in $(INDENTDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit $$? ; done
+
clean:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit $$? ; done
View
@@ -120,7 +120,9 @@ build-test: deps extras
@ANT_OPTS="-Xmx1g -XX:MaxPermSize=512m" $(ANT) jar
@make -C eucadmin
-
+indent:
+ $(ANT) indent
+
clean: deps
$(ANT) clean
make -C eucadmin clean
View
@@ -125,6 +125,10 @@
</target>
<!--================================== clean targets ==================================-->
+ <target name="indent">
+ <call-module-target target="indent"/>
+ </target>
+ <!--================================== clean targets ==================================-->
<target name="clean">
<call-module-target target="clean"/>
<delete file="${project.basedir}/modules/msgs/src/main/resources/msgs-binding.xml"/>
@@ -61,9 +61,11 @@
-->
<project name="eucalyptus-auth" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml"/>
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
</project>
@@ -65,6 +65,9 @@
<import file="../module-inc.xml"/>
<!--================================== BUILD TARGETS ==================================-->
+ <target name="indent-module">
+ <native-make dir="src/main/native" target="indent" />
+ </target>
<target name="build-module">
<mkdir dir="build"/>
<native-make dir="src/main/native" target="all" />
@@ -88,6 +88,10 @@ install: eucalyptus-cloud
$(INSTALL) -d $(DESTDIR)$(sbindir)
$(INSTALL) -m 0755 eucalyptus-cloud $(DESTDIR)$(sbindir)/eucalyptus-cloud
+indent:
+ @indent *.[ch] -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0 -d0 -di1 -nfc1 -i4 -ut -ip0 -l200 -lp -npcs -nprs -npsl -sai -saf -saw -ncs -nsc -sob -nfca -ss -ts4 -il0 -nip
+ @\rm *.*~
+
clean:
@$(RM) -f $(OBJS) eucalyptus-cloud
@@ -61,10 +61,12 @@
-->
<project name="eucalyptus-cloud" basedir=".">
- <!--================================== BUILD TARGETS ==================================-->
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml" />
+ <!--================================== BUILD TARGETS ==================================-->
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml" />
+ <target name="indent-module">
+ </target>
</project>
@@ -66,4 +66,6 @@
<srcfiles dir="${src.dir}" includes="**/*" />
</uptodate>
<import file="../module-inc.xml" />
+ <target name="indent-module">
+ </target>
</project>
@@ -61,9 +61,11 @@
-->
<project name="eucalyptus-component" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml"/>
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
</project>
@@ -61,9 +61,11 @@
-->
<project name="eucalyptus-config" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml"/>
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
</project>
View
@@ -61,9 +61,11 @@
-->
<project name="eucalyptus-core" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml" />
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml" />
+ <target name="indent-module">
+ </target>
</project>
@@ -61,5 +61,7 @@
-->
<project name="eucalyptus-dns" basedir="." >
- <import file="../module-inc.xml"/>
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
</project>
@@ -61,9 +61,11 @@
-->
<project name="eucalyptus-euare-common" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml"/>
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
</project>
@@ -61,9 +61,11 @@
-->
<project name="eucalyptus-euare" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml"/>
+ <property name="builder.suffix" value="groovy" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
</project>
@@ -245,6 +245,10 @@
</copy>
<antcall target="install-module" />
</target>
+ <!--================================== indent target ==================================-->
+ <target name="indent">
+ <antcall target="indent-module" />
+ </target>
<!--================================== clean target ==================================-->
<target name="clean">
<antcall target="clean-module" />
@@ -61,7 +61,9 @@
-->
<project name="eucalyptus-msgs" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <import file="../module-inc.xml"/>
- <!--================================== BUILD TARGETS ==================================-->
+ <property name="builder.suffix" value="groovy" />
+ <import file="../module-inc.xml"/>
+ <!--================================== BUILD TARGETS ==================================-->
+ <target name="indent-module">
+ </target>
</project>
@@ -60,10 +60,14 @@
NEEDED TO COMPLY WITH ANY SUCH LICENSES OR RIGHTS.
-->
-<project name="eucalyptus-notifications-common" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
- <import file="../module-inc.xml"/>
+<project name="eucalyptus-postgresql" basedir=".">
+ <property name="builder.suffix" value="groovy" />
+
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+
+ <import file="../module-inc.xml" />
+ <target name="indent-module">
+ </target>
</project>
@@ -61,11 +61,13 @@
-->
<project name="eucalyptus-postgresql" basedir=".">
- <property name="builder.suffix" value="groovy" />
+ <property name="builder.suffix" value="groovy" />
- <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
- <srcfiles dir="${src.dir}" includes="**/*" />
- </uptodate>
-
- <import file="../module-inc.xml" />
+ <uptodate property="groovyc.notRequired" targetfile="${jar.file}">
+ <srcfiles dir="${src.dir}" includes="**/*" />
+ </uptodate>
+
+ <import file="../module-inc.xml" />
+ <target name="indent-module">
+ </target>
</project>
@@ -61,16 +61,18 @@
-->
<project name="eucalyptus-reporting" basedir=".">
- <property name="builder.suffix" value="groovy" />
- <import file="../module-inc.xml"/>
- <target name="build-csvchecker-jar" depends="builder-test">
- <echo message="${build.dir}"/>
- <jar destfile="${build.dir}/CsvChecker.jar"
+ <property name="builder.suffix" value="groovy" />
+ <import file="../module-inc.xml"/>
+ <target name="indent-module">
+ </target>
+ <target name="build-csvchecker-jar" depends="builder-test">
+ <echo message="${build.dir}"/>
+ <jar destfile="${build.dir}/CsvChecker.jar"
baseDir="${build.dir}"
includes="com/eucalyptus/reporting/CsvCheck*.class">
- <manifest>
- <attribute name="Main-Class" value="com.eucalyptus.reporting.CsvChecker"/>
- </manifest>
- </jar>
- </target>
+ <manifest>
+ <attribute name="Main-Class" value="com.eucalyptus.reporting.CsvChecker"/>
+ </manifest>
+ </jar>
+ </target>
</project>
@@ -61,16 +61,17 @@
-->
<project name="eucalyptus-storage-common" basedir=".">
- <import file="../module-inc.xml"/>
-
- <property name="euca.udev.dir" value="${euca.home}/usr/share/eucalyptus/udev" />
- <target name="install-module">
- <!-- copy udev config over -->
- <mkdir dir="${DESTDIR}${euca.udev.dir}" />
- <copy todir="${DESTDIR}${euca.udev.dir}" overwrite="true">
- <fileset dir="${basedir}/udev">
- <include name="**/*" />
- </fileset>
- </copy>
- </target>
+ <import file="../module-inc.xml"/>
+ <property name="euca.udev.dir" value="${euca.home}/usr/share/eucalyptus/udev" />
+ <target name="indent-module">
+ </target>
+ <target name="install-module">
+ <!-- copy udev config over -->
+ <mkdir dir="${DESTDIR}${euca.udev.dir}" />
+ <copy todir="${DESTDIR}${euca.udev.dir}" overwrite="true">
+ <fileset dir="${basedir}/udev">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+ </target>
</project>
@@ -61,46 +61,48 @@
-->
<project name="eucalyptus-storagecontroller" basedir=".">
-
<import file="../module-inc.xml" />
<!--================================== BUILD TARGETS ==================================-->
- <property name="builder.suffix" value="jni" />
+ <target name="indent-module">
+ <native-make dir="native" target="indent" />
+ </target>
+ <property name="builder.suffix" value="jni" />
<target name="do-build-jni">
- <antcall target="build-jni"/>
+ <antcall target="build-jni" />
</target>
<target name="build-jni">
<antcall target="build-java" />
- <antcall target="jar" />
+ <antcall target="jar" />
<mkdir dir="include" />
<javah classpath="${build.dir}" destdir="include" force="yes">
<class name="com.eucalyptus.storage.OverlayManager" />
<class name="com.eucalyptus.storage.AOEManager" />
<class name="com.eucalyptus.storage.DASManager" />
</javah>
- <native-make dir="native" target="all"/>
+ <native-make dir="native" target="all" />
</target>
<target name="clean-module">
<delete dir="h" />
<delete dir="include" />
- <native-make dir="native" target="clean"/>
+ <native-make dir="native" target="clean" />
</target>
<target name="distclean-module">
- <native-make dir="native" target="distclean"/>
+ <native-make dir="native" target="distclean" />
</target>
<target name="uninstall-module">
- <native-make dir="native" target="uninstall"/>
+ <native-make dir="native" target="uninstall" />
</target>
<!--================================== install target ==================================-->
<target name="install">
- <copy todir="${DESTDIR}${euca.conf.dir}" overwrite="true">
- <fileset dir="conf">
- <include name="**/*" />
- </fileset>
- </copy>
- <copy todir="${DESTDIR}${euca.lib.dir}" overwrite="true">
- <fileset file="${jar.file}" />
- </copy>
- <native-make dir="native" target="install"/>
+ <copy todir="${DESTDIR}${euca.conf.dir}" overwrite="true">
+ <fileset dir="conf">
+ <include name="**/*" />
+ </fileset>
+ </copy>
+ <copy todir="${DESTDIR}${euca.lib.dir}" overwrite="true">
+ <fileset file="${jar.file}" />
+ </copy>
+ <native-make dir="native" target="install" />
</target>
</project>
Oops, something went wrong.

0 comments on commit 6105183

Please sign in to comment.